Skip to content

Commit e70f7ce

Browse files
committed
add test case against splitting UTF8 sequences (introduced by #857)
1 parent e8182d5 commit e70f7ce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/log/syslog.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,11 @@ mod tests {
198198

199199
logger.log(&record);
200200
}
201+
202+
#[test]
203+
fn will_not_break_utf8() {
204+
let mut writer = SysLogWriter::new(libc::LOG_DEBUG, FACILITY);
205+
206+
let _ = write!(writer, "{}¢", "x".repeat(959));
207+
}
201208
}

0 commit comments

Comments
 (0)