tstrlits.nim 380 B

1234567891011121314151617181920
  1. discard """
  2. output: "a\"\"long string\"\"\"\"\"abc\"def_'2'●𝌆𝌆A"
  3. """
  4. # Test the new different string literals
  5. const
  6. tripleEmpty = """"long string"""""""" # "long string """""
  7. rawQuote = r"a"""
  8. raw = r"abc""def"
  9. escaped = "\x5f'\50'\u25cf\u{1D306}\u{1d306}\u{41}"
  10. stdout.write(rawQuote)
  11. stdout.write(tripleEmpty)
  12. stdout.write(raw)
  13. stdout.writeLine(escaped)