diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2021-05-06 11:58:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 10:58:01 +0200 |
commit | 436af88d8c436265c751bbbc0d76ef42aab0cdf0 (patch) | |
tree | 608eedcc3573b342ecd0eed2a16e9a129924660f /tests/stdlib/thighlite.nim | |
parent | 706562f661e49d06f63a1283525275fb70bb7073 (diff) | |
download | Nim-436af88d8c436265c751bbbc0d76ef42aab0cdf0.tar.gz |
follow-up #17837: add `Console` for interactive sessions (#17930)
* follow-up #17837: add `Console` for interactive sessions * fix Latex
Diffstat (limited to 'tests/stdlib/thighlite.nim')
-rw-r--r-- | tests/stdlib/thighlite.nim | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/stdlib/thighlite.nim b/tests/stdlib/thighlite.nim index f26ea93e4..4113a6a80 100644 --- a/tests/stdlib/thighlite.nim +++ b/tests/stdlib/thighlite.nim @@ -1,8 +1,8 @@ -import unittest +import unittest, strutils import ../../lib/packages/docutils/highlite -block: # Nim tokenizing" +block: # Nim tokenizing test "string literals and escape seq": check("\"ok1\\nok2\\nok3\"".tokenize(langNim) == @[("\"ok1", gtStringLit), ("\\n", gtEscapeSequence), ("ok2", gtStringLit), @@ -11,3 +11,16 @@ block: # Nim tokenizing" check("\"\"\"ok1\\nok2\\nok3\"\"\"".tokenize(langNim) == @[("\"\"\"ok1\\nok2\\nok3\"\"\"", gtLongStringLit) ]) + +block: # Cmd (shell) tokenizing + test "cmd with dollar and output": + check( + dedent""" + $ nim c file.nim + out: file [SuccessX]""" + .tokenize(langConsole) == + @[("$ ", gtPrompt), ("nim", gtProgram), + (" ", gtWhitespace), ("c", gtOption), (" ", gtWhitespace), + ("file.nim", gtIdentifier), ("\n", gtWhitespace), + ("out: file [SuccessX]", gtProgramOutput) + ]) |