Add more replace test cases
This commit is contained in:
parent
a14a2e7a84
commit
e91dd1d956
1 changed files with 3 additions and 0 deletions
|
|
@ -11,3 +11,6 @@ suite "replace":
|
|||
check("123".replace(re"\d", "foo") == "foofoofoo")
|
||||
check("123".replace(re"(\d)", "$1$1") == "112233")
|
||||
check("123".replace(re"(\d)(\d)", "$1$2") == "123")
|
||||
check("123".replace(re"(\d)(\d)", "$#$#") == "123")
|
||||
check("123".replace(re"(?<foo>\d)(\d)", "$foo$#$#") == "1123")
|
||||
check("123".replace(re"(?<foo>\d)(\d)", "${foo}$#$#") == "1123")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue