Skip to content

Commit

Permalink
add test case against splitting UTF8 sequences (introduced by #857)
Browse files Browse the repository at this point in the history
  • Loading branch information
squell committed Sep 6, 2024
1 parent d696886 commit 112ce8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/log/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,11 @@ mod tests {

logger.log(&record);
}

#[test]
fn will_not_break_utf8() {
let mut writer = SysLogWriter::new(libc::LOG_DEBUG, FACILITY);

let _ = write!(writer, "{}¢", "x".repeat(959));
}
}

0 comments on commit 112ce8d

Please sign in to comment.