summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-05 00:47:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-05 00:47:39 +0000
commit9b83640ace8ecce9f2982167e5a081c8e8452fd7 (patch)
tree564816adfe05d0cbd6fd2c3bed042e17314603cf
parenta0dbb04553005cdbafdeb7435a79ae500b5aa8ff (diff)
downloadperl-9b83640ace8ecce9f2982167e5a081c8e8452fd7.tar.gz
Add some Unicode chop() tests.
p4raw-id: //depot/perl@8324
-rwxr-xr-xt/op/chop.t16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/op/chop.t b/t/op/chop.t
index 6723ca3f1b..65d0669841 100755
--- a/t/op/chop.t
+++ b/t/op/chop.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..30\n";
+print "1..33\n";
# optimized
@@ -89,3 +89,17 @@ $_ = "ab\n";
$/ = \3;
print chomp() == 0 ? "ok 29\n" : "not ok 29\n";
print $_ eq "ab\n" ? "ok 30\n" : "not ok 30\n";
+
+# Go Unicode.
+
+$_ = "abc\x{1234}";
+chop;
+print $_ eq "abc" ? "ok 31\n" : "not ok 31\n";
+
+$_ = "abc\x{1234}d";
+chop;
+print $_ eq "abc\x{1234}" ? "ok 32\n" : "not ok 32\n";
+
+$_ = "\x{1234}\x{2345}";
+chop;
+print $_ eq "\x{1234}" ? "ok 33\n" : "not ok 33\n";