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 Aug 24, 2024
1 parent e8182d5 commit e70f7ce
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 e70f7ce

Please sign in to comment.