diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-10 20:41:37 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-10 20:41:37 +0000 |
commit | 974f237af9a53a4c10de7d504c982c930b7d3c39 (patch) | |
tree | 761a16da0c5df19cc78ebdfc89561afc0dc4d537 /t/op/split.t | |
parent | 3e6e81d1379df3821a835e0587b454fcb55b1187 (diff) | |
download | perl-974f237af9a53a4c10de7d504c982c930b7d3c39.tar.gz |
Test for bug id 20010105.016 (fixed by #8378).
p4raw-id: //depot/perl@8395
Diffstat (limited to 't/op/split.t')
-rwxr-xr-x | t/op/split.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/op/split.t b/t/op/split.t index 90c38e0770..ffc29be899 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -1,6 +1,6 @@ #!./perl -print "1..30\n"; +print "1..32\n"; $FS = ':'; @@ -129,6 +129,27 @@ print "not" if $_ ne "r:m :b"; print "ok 29\n"; # unicode splittage + @ary = map {ord} split //, v1.20.300.4000.50000.4000.300.20.1; print "not " unless "@ary" eq "1 20 300 4000 50000 4000 300 20 1"; print "ok 30\n"; + +@ary = split(/\x{FE}/, "\x{FF}\x{FE}\x{FD}"); # bug id 20010105.016 +print "not " unless @ary == 2 && + $ary[0] eq "\xFF" && $ary[1] eq "\xFD" && + $ary[0] eq "\x{FF}" && $ary[1] eq "\x{FD}"; +print "ok 31\n"; + +@ary = split(/(\x{FE}\xFE)/, "\xFF\x{FF}\xFE\x{FE}\xFD\x{FD}"); # variant of 31 +print "not " unless @ary == 3 && + $ary[0] eq "\xFF\xFF" && + $ary[0] eq "\x{FF}\xFF" && + $ary[0] eq "\x{FF}\x{FF}" && + $ary[1] eq "\xFE\xFE" && + $ary[1] eq "\x{FE}\xFE" && + $ary[1] eq "\x{FE}\x{FE}" && + $ary[2] eq "\xFD\xFD" && + $ary[2] eq "\x{FD}\xFD" && + $ary[2] eq "\x{FD}\x{FD}"; + +print "ok 32\n"; |