followup custom literals (#17500)

This commit is contained in:
Timothee Cour 2021-03-27 12:03:14 -07:00 • committed by GitHub
commit bbe4cf4703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 94 additions and 33 deletions

19
tests/lexer/tstrlits.nim Normal file
View 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)