followup custom literals (#17500)
This commit is contained in:
parent
d3705b253c
commit
bbe4cf4703
7 changed files with 94 additions and 33 deletions
19
tests/lexer/tstrlits.nim
Normal file
19
tests/lexer/tstrlits.nim
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue