mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-30 18:41:45 +00:00
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import unittest, strutils
|
||||
import ../../lib/packages/docutils/highlite
|
||||
import std/objectdollar
|
||||
|
||||
block: # Nim tokenizing
|
||||
test "string literals and escape seq":
|
||||
@@ -30,3 +31,12 @@ block: # Cmd (shell) tokenizing
|
||||
("file.nim", gtIdentifier), ("\n", gtWhitespace),
|
||||
("out: file [SuccessX]", gtProgramOutput)
|
||||
])
|
||||
|
||||
block: # bug #21232
|
||||
let code = "/"
|
||||
var toknizr: GeneralTokenizer
|
||||
|
||||
initGeneralTokenizer(toknizr, code)
|
||||
|
||||
getNextToken(toknizr, langC)
|
||||
check $toknizr == """(kind: gtOperator, start: 0, length: 1, buf: "/", pos: 1, state: gtEof, lang: langC)"""
|
||||
|
||||
Reference in New Issue
Block a user