Unicode escape in string literals (#9390)

This commit is contained in:
Oscar Nihlgård
2018-10-17 00:14:22 +02:00
committed by Andreas Rumpf
parent 0d48bafcf0
commit 163e9de3c2
3 changed files with 73 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
discard """
file: "tstrlits.nim"
output: "a\"\"long string\"\"\"\"\"abc\"def_'2'"
output: "a\"\"long string\"\"\"\"\"abc\"def_'2'𝌆𝌆A"
"""
# Test the new different string literals
@@ -11,14 +11,14 @@ const
raw = r"abc""def"
escaped = "\x5f'\50'\u25cf"
escaped = "\x5f'\50'\u25cf\u{1D306}\u{1d306}\u{41}"
stdout.write(rawQuote)
stdout.write(tripleEmpty)
stdout.write(raw)
stdout.write(escaped)
#OUT a""long string"""""abc"def
#OUT a""long string"""""abc"def_'2'●𝌆𝌆A