fix #9437(fix re.replace wrong behaviour) (#17546)
* fix nim js cmp fails at CT * fix
This commit is contained in:
parent
f65f760dee
commit
6b97889f44
2 changed files with 24 additions and 5 deletions
|
|
@ -99,10 +99,13 @@ proc testAll() =
|
|||
accum.add($x)
|
||||
doAssert(accum == @["a","b","c"])
|
||||
|
||||
block:
|
||||
# bug #9306
|
||||
block: # bug #9306
|
||||
doAssert replace("bar", re"^", "foo") == "foobar"
|
||||
doAssert replace("foo", re"", "-") == "-foo"
|
||||
doAssert replace("foo", re"$", "bar") == "foobar"
|
||||
|
||||
|
||||
block: # bug #9437
|
||||
doAssert replace("foo", re"", "-") == "-f-o-o-"
|
||||
doAssert replace("ooo", re"o", "-") == "---"
|
||||
|
||||
testAll()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue