commit c6f4951004fd7e8125b94baacc892282b379791f
parent 50391ff7ab875019a6fdd575fd2d08db7e2aff4b
Author: Christopher M. Riedl <cmr@bluescreens.de>
Date: Fri, 25 Feb 2022 22:39:06 -0600
strings::replace: fix incorrect test
Signed-off-by: Christopher M. Riedl <cmr@bluescreens.de>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/strings/replace.ha b/strings/replace.ha
@@ -30,6 +30,6 @@ export fn replace(s: str, needle: str, target: str) str = {
assert(replace("I like dogs, dogs, birds, dogs", "dogs", "cats") ==
"I like cats, cats, birds, cats");
assert(replace("aaaaaa", "aa", "a") == "aaa");
- assert(replace("aaaaaa", "a", "aa") == "aaaaaa");
+ assert(replace("aaa", "a", "aa") == "aaaaaa");
assert(replace("こんにちは", "にち", "ばん") == "こんばんは");
};