aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-22 16:34:41 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-22 16:34:41 -0500
commite0706bc707ea6a8be86cee9fde21971cde3d7a42 (patch)
tree4f99c54a00ca88c87ea4e57ccbf2f644fc9c4bbe /test
parenta529e344c07a064de1391c1a4bf354fe1a95707d (diff)
Bugfix for infinite loop in text.replace("", ...) with empty string
Diffstat (limited to 'test')
-rw-r--r--test/text.tm2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm
index 6631b94e..094da8f8 100644
--- a/test/text.tm
+++ b/test/text.tm
@@ -57,6 +57,8 @@ func main()
assert "xxxx".replace("x", "") == ""
assert "xxxx".replace("y", "") == "xxxx"
assert "One two three four five six".replace("e ", "") == "Ontwo threfour fivsix"
+ assert "Hello".replace("", "xxx") == "Hello"
+ assert "".replace("", "xxx") == ""
assert amelie.has(amelie2) == yes