mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
@@ -108,4 +108,10 @@ proc testAll() =
|
||||
doAssert replace("foo", re"", "-") == "-f-o-o-"
|
||||
doAssert replace("ooo", re"o", "-") == "---"
|
||||
|
||||
block: # bug #14468
|
||||
accum = @[]
|
||||
for word in split("this is an example", re"\b"):
|
||||
accum.add(word)
|
||||
doAssert(accum == @["this", " ", "is", " ", "an", " ", "example"])
|
||||
|
||||
testAll()
|
||||
|
||||
Reference in New Issue
Block a user