summary refs log tree commit diff stats
path: root/tests/lexer/tstrlits.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lexer/tstrlits.nim')
-rw-r--r--tests/lexer/tstrlits.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lexer/tstrlits.nim b/tests/lexer/tstrlits.nim
new file mode 100644
index 000000000..8e8250a5b
--- /dev/null
+++ b/tests/lexer/tstrlits.nim
@@ -0,0 +1,19 @@
+discard """
+  output: "a\"\"long string\"\"\"\"\"abc\"def_'2'●𝌆𝌆A"
+"""
+# Test the new different string literals
+
+const
+  tripleEmpty = """"long string"""""""" # "long string """""
+
+  rawQuote = r"a"""
+
+  raw = r"abc""def"
+
+  escaped = "\x5f'\50'\u25cf\u{1D306}\u{1d306}\u{41}"
+
+
+stdout.write(rawQuote)
+stdout.write(tripleEmpty)
+stdout.write(raw)
+stdout.writeLine(escaped)