mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
Unicode escape in string literals (#9390)
This commit is contained in:
committed by
Andreas Rumpf
parent
0d48bafcf0
commit
163e9de3c2
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user