From b2b1edc4dccc49c2c018a29f06949f0f484d8161 Mon Sep 17 00:00:00 2001 From: Pierre-Henri Symoneaux Date: Mon, 5 Jun 2017 22:23:26 +0200 Subject: Improving coverage, just for testing --- src/utils.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/utils.rs b/src/utils.rs index c00b2d7..a9da33b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -128,4 +128,11 @@ mod tests { print_align(&mut out, Alignment::CENTER, "foo", '*', 1, false).unwrap(); assert_eq!(out.as_string(), "foo"); } + + #[test] + fn utf8_error() { + let mut out = StringWriter::new(); + let res = out.write_all(&vec![0, 255]); + assert!(res.is_err()); + } } -- cgit v1.2.3