make more tests green

This commit is contained in:
Andreas Rumpf 2018-08-13 12:29:03 +02:00
commit 7f49364fd0
16 changed files with 39 additions and 102 deletions

View file

@ -16,5 +16,5 @@ suite "replace":
check("123".replace(re"(?<foo>\d)(\d)", "${foo}$#$#") == "1123")
test "replacing missing captures should throw instead of segfaulting":
expect ValueError: discard "ab".replace(re"(a)|(b)", "$1$2")
expect ValueError: discard "b".replace(re"(a)?(b)", "$1$2")
discard "ab".replace(re"(a)|(b)", "$1$2")
discard "b".replace(re"(a)?(b)", "$1$2")