diff options
| author | Simon Mazur <semmaz.box@gmail.com> | 2015-09-29 15:53:58 +0300 |
|---|---|---|
| committer | Simon Mazur <semmaz.box@gmail.com> | 2015-09-29 15:53:58 +0300 |
| commit | 025ca11ab909a2f2eda4ae8ccb891acf83b296f3 (patch) | |
| tree | 7a916b60f58b033e065d3a48e1630bf566ad749e | |
| parent | 24b5d3afd75a6cdbaca1dc488d43b90f159108cb (diff) | |
| download | rust-025ca11ab909a2f2eda4ae8ccb891acf83b296f3.tar.gz rust-025ca11ab909a2f2eda4ae8ccb891acf83b296f3.zip | |
Add `fmt::Debug` string escape tests
| -rw-r--r-- | src/test/run-pass/ifmt.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index c8adb6ccc0a..2cc033b8a46 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -74,6 +74,10 @@ pub fn main() { t!(format!("{:?}", 10_usize), "10"); t!(format!("{:?}", "true"), "\"true\""); t!(format!("{:?}", "foo\nbar"), "\"foo\\nbar\""); + t!(format!("{:?}", "foo\n\"bar\"\r\n\'baz\'\t\\qux\\"), + r#""foo\n\"bar\"\r\n\'baz\'\t\\qux\\""#); + t!(format!("{:?}", "foo\0bar\x01baz\u{3b1}q\u{75}x"), + r#""foo\u{0}bar\u{1}baz\u{3b1}qux""#); t!(format!("{:o}", 10_usize), "12"); t!(format!("{:x}", 10_usize), "a"); t!(format!("{:X}", 10_usize), "A"); |
