mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
25 lines
401 B
Nim
25 lines
401 B
Nim
discard """
|
|
file: "tstrlits.nim"
|
|
output: "a\"\"long string\"\"\"\"\"abc\"def_'2'●"
|
|
"""
|
|
# Test the new different string literals
|
|
|
|
const
|
|
tripleEmpty = """"long string"""""""" # "long string """""
|
|
|
|
rawQuote = r"a"""
|
|
|
|
raw = r"abc""def"
|
|
|
|
escaped = "\x5f'\50'\u25cf"
|
|
|
|
|
|
stdout.write(rawQuote)
|
|
stdout.write(tripleEmpty)
|
|
stdout.write(raw)
|
|
stdout.write(escaped)
|
|
#OUT a""long string"""""abc"def
|
|
|
|
|
|
|