From e122c6ff4a7f21026332ce9211ad095bd44e71ea Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 Jul 2024 12:06:52 +0200 Subject: Fix bug in $string.{contains,ends_with,replace}() (GH issue #405) These functions use the common rfind() helper which contains the bug. --- tests/function/string/testscript | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/function') diff --git a/tests/function/string/testscript b/tests/function/string/testscript index 8eb5760..57f30e2 100644 --- a/tests/function/string/testscript +++ b/tests/function/string/testscript @@ -47,6 +47,7 @@ { $* <'print $string.contains(abcdabcd, da, once)' >'true' : true $* <'print $string.contains(abcdabcd, bc, once)' >'false' : false + $* <'print $string.contains(abcdefgh, ab, once)' >'true' : true-begin } } @@ -76,6 +77,7 @@ { $* <'print $string.ends_with( abcd, cd)' >'true' : true $* <'print $string.ends_with( abcd, bc)' >'false' : false + $* <'print $string.ends_with( abcd, xxxx)' >'false' : false-equal-size $* <'print $ends_with([string] abcd, abcd)' >'true' : typed } -- cgit v1.1