Adds test case to is isMainModule block
Adds the test case that originally caused the bug, issue #2418.
This commit is contained in:
parent
13e5a9ea6c
commit
7ee6c72b51
1 changed files with 6 additions and 1 deletions
|
|
@ -474,7 +474,12 @@ when isMainModule:
|
|||
var accum: seq[string] = @[]
|
||||
for word in split("00232this02939is39an22example111", re"\d+"):
|
||||
accum.add(word)
|
||||
assert(accum == @["this", "is", "an", "example"])
|
||||
assert(accum == @["", "this", "is", "an", "example", ""])
|
||||
|
||||
accum = @[]
|
||||
for word in split("AAA : : BBB", re"\s*:\s*"):
|
||||
accum.add(word)
|
||||
assert(accum == @["AAA", "", "BBB"])
|
||||
|
||||
for x in findAll("abcdef", re"^{.}", 3):
|
||||
assert x == "d"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue