Skip to content

Commit 025ca11

Browse files
committed
Add fmt::Debug string escape tests
1 parent 24b5d3a commit 025ca11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/run-pass/ifmt.rs

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ pub fn main() {
7474
t!(format!("{:?}", 10_usize), "10");
7575
t!(format!("{:?}", "true"), "\"true\"");
7676
t!(format!("{:?}", "foo\nbar"), "\"foo\\nbar\"");
77+
t!(format!("{:?}", "foo\n\"bar\"\r\n\'baz\'\t\\qux\\"),
78+
r#""foo\n\"bar\"\r\n\'baz\'\t\\qux\\""#);
79+
t!(format!("{:?}", "foo\0bar\x01baz\u{3b1}q\u{75}x"),
80+
r#""foo\u{0}bar\u{1}baz\u{3b1}qux""#);
7781
t!(format!("{:o}", 10_usize), "12");
7882
t!(format!("{:x}", 10_usize), "a");
7983
t!(format!("{:X}", 10_usize), "A");

0 commit comments

Comments
 (0)