diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-04 18:09:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-04 18:09:38 +0000 |
commit | cce850e4f65d092b5704ab42116f11f5188dd74e (patch) | |
tree | 86420e16cde9c0ee15805f5242bff7029ae0921c /t/op/pat.t | |
parent | 01485f8b60f6cb9da6ceaaafc3abd52c6f690081 (diff) | |
download | perl-cce850e4f65d092b5704ab42116f11f5188dd74e.tar.gz |
Continuation of #11575: SANY_SEEN completely deprecated,
plus more tests that unearthed a bug in @a = ($utf8 =~ /\C/g),
plus a fix for the bug.
p4raw-id: //depot/perl@11577
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-x | t/op/pat.t | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index b4f7279691..270d65a2e9 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..675\n"; +print "1..683\n"; BEGIN { chdir 't' if -d 't'; @@ -1952,3 +1952,30 @@ print "ok 674\n"; print "not " unless $#a == 12; print "ok 675\n"; } + +@a = ("foo\nbar" =~ /./g); +print "ok 676\n" if @a == 6 && "@a" eq "f o o b a r"; + +@a = ("foo\nbar" =~ /./gs); +print "ok 677\n" if @a == 7 && "@a" eq "f o o \n b a r"; + +@a = ("foo\nbar" =~ /\C/g); +print "ok 678\n" if @a == 7 && "@a" eq "f o o \n b a r"; + +@a = ("foo\nbar" =~ /\C/gs); +print "ok 679\n" if @a == 7 && "@a" eq "f o o \n b a r"; + +@a = ("foo\n\x{100}bar" =~ /./g); +print "ok 680\n" if @a == 7 && "@a" eq "f o o \x{100} b a r"; + +@a = ("foo\n\x{100}bar" =~ /./gs); +print "ok 681\n" if @a == 8 && "@a" eq "f o o \n \x{100} b a r"; + +($a, $b) = map { chr } ord('A') == 65 ? (0xc4, 0x80) : (0x8c, 0x41); + +@a = ("foo\n\x{100}bar" =~ /\C/g); +print "ok 682\n" if @a == 9 && "@a" eq "f o o \n $a $b b a r"; + +@a = ("foo\n\x{100}bar" =~ /\C/gs); +print "ok 683\n" if @a == 9 && "@a" eq "f o o \n $a $b b a r"; + |