summaryrefslogtreecommitdiff
path: root/test/it.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/it.t')
-rwxr-xr-xtest/it.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/it.t b/test/it.t
index 49d5854..a3abf32 100755
--- a/test/it.t
+++ b/test/it.t
@@ -381,6 +381,10 @@ is(it::ucwords('foo bär über'), 'Foo Bär Über');
# it::substr_replace
is(it::substr_replace('abcdefgh', 'xyz', 2, 4), substr_replace('abcdefgh', 'xyz', 2, 4), 'it::substr_replace the same as substr_replace for ascii');
is(it::substr_replace('✔☯♥', '☃☃', 1, 1), '✔☃☃♥', 'it::substr_replace for utf-8');
+is(it::substr_replace('', 'xyz', 0, 0), substr_replace('', 'xyz', 0, 0), 'it::substr_replace with empty haystack the same as substr_replace');
+is(it::substr_replace('abc', 'xyz', 0, 2), substr_replace('abc', 'xyz', 0, 2), 'it::substr_replace replacing to end of haystack');
+is(it::substr_replace('abc', 'xyz', 0, 10), substr_replace('abc', 'xyz', 0, 10), 'it::substr_replace replacing past end of haystack');
+is(it::substr_replace('abcdefgh', 'xyz', 10, 4), substr_replace('abcdefgh', 'xyz', 10, 4), 'it::substr_replace outside of string');
is(grapheme_strlen("\xc1"), null, "need grapheme_strlen side effect for any2utf8");