* follow-up #17837: add `Console` for interactive sessions * fix Latex
This commit is contained in:
parent
706562f661
commit
436af88d8c
14 changed files with 252 additions and 155 deletions
|
|
@ -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)
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue