summaryrefslogtreecommitdiff
path: root/t/op/substr.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-21 01:16:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-21 01:16:29 +0000
commit9402d6ed2c283eecb57dee09174d6f259c11dbef (patch)
treee51a3654ee01586c4fe1890a6ae794596f71bbdd /t/op/substr.t
parent2d5e9e5d1dfda924cd025894f9c8781ba03c3c8c (diff)
downloadperl-9402d6ed2c283eecb57dee09174d6f259c11dbef.tar.gz
Continue 4-arg substr() UTF-8 fixage.
p4raw-id: //depot/perl@9270
Diffstat (limited to 't/op/substr.t')
-rwxr-xr-xt/op/substr.t20
1 files changed, 19 insertions, 1 deletions
diff --git a/t/op/substr.t b/t/op/substr.t
index 7ac419406b..85574d56ec 100755
--- a/t/op/substr.t
+++ b/t/op/substr.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..168\n";
+print "1..174\n";
#P = start of string Q = start of substr R = end of substr S = end of string
@@ -567,3 +567,21 @@ ok 167, $x eq "ab\x{100}\x{200}";
substr($x = "\x{100}\x{200}", 2, 0, "ab");
ok 168, $x eq "\x{100}\x{200}ab";
+substr($x = "\xFFb", 0, 0, "\x{100}\x{200}");
+ok 169, $x eq "\x{100}\x{200}\xFFb";
+
+substr($x = "\x{100}\x{200}", 0, 0, "\xFFb");
+ok 170, $x eq "\xFFb\x{100}\x{200}";
+
+substr($x = "\xFFb", 1, 0, "\x{100}\x{200}");
+ok 171, $x eq "\xFF\x{100}\x{200}b";
+
+substr($x = "\x{100}\x{200}", 1, 0, "\xFFb");
+ok 172, $x eq "\x{100}\xFFb\x{200}";
+
+substr($x = "\xFFb", 2, 0, "\x{100}\x{200}");
+ok 173, $x eq "\xFFb\x{100}\x{200}";
+
+substr($x = "\x{100}\x{200}", 2, 0, "\xFFb");
+ok 174, $x eq "\x{100}\x{200}\xFFb";
+