summaryrefslogtreecommitdiffstats
path: root/tests/pretty/format-args-str-escape.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/pretty/format-args-str-escape.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pretty/format-args-str-escape.rs b/tests/pretty/format-args-str-escape.rs
new file mode 100644
index 000000000..e596fcfd8
--- /dev/null
+++ b/tests/pretty/format-args-str-escape.rs
@@ -0,0 +1,10 @@
+// pretty-compare-only
+// pretty-mode:expanded
+// pp-exact:format-args-str-escape.pp
+
+fn main() {
+ println!("\x1B[1mHello, world!\x1B[0m");
+ println!("\u{1B}[1mHello, world!\u{1B}[0m");
+ println!("Not an escape sequence: \\u{{1B}}[1mbold\\x1B[0m");
+ println!("{}", "\x1B[1mHello, world!\x1B[0m");
+}