diff --git a/tests/test.rs b/tests/test.rs index 3f0bfd3c..4c2de3c8 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -114,6 +114,10 @@ fn literal_string() { assert_eq!(Literal::string("foo").to_string(), "\"foo\""); assert_eq!(Literal::string("\"").to_string(), "\"\\\"\""); assert_eq!(Literal::string("didn't").to_string(), "\"didn't\""); + assert_eq!( + Literal::string("a\00b\07c\08d\0e\0").to_string(), + "\"a\\00b\\07c\\08d\\0e\\0\"", + ); } #[test] @@ -147,6 +151,10 @@ fn literal_byte_string() { Literal::byte_string(b"\0\t\n\r\"\\2\x10").to_string(), "b\"\\0\\t\\n\\r\\\"\\\\2\\x10\"", ); + assert_eq!( + Literal::byte_string(b"a\00b\07c\08d\0e\0").to_string(), + "b\"a\\00b\\07c\\08d\\0e\\0\"", + ); } #[test]