diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-04-29 15:43:22 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-04-29 15:43:22 +0000 |
commit | a2f19d56607c6631ca34ae920e740e4fa02ba501 (patch) | |
tree | ab6f086c6285918ec41aed0d8afd4931a040dffe /t | |
parent | a5b5a15b6f3539d598c74676dd07c037780e6604 (diff) | |
parent | aa58aa353209e3416c78e241b039154fdfd9415b (diff) | |
download | perl-a2f19d56607c6631ca34ae920e740e4fa02ba501.tar.gz |
Integrate mainline.
p4raw-id: //depot/perlio@9904
Diffstat (limited to 't')
-rw-r--r-- | t/lib/b-deparse.t | 4 | ||||
-rw-r--r-- | t/lib/selfstubber.t | 4 | ||||
-rwxr-xr-x | t/op/pat.t | 114 |
3 files changed, 111 insertions, 11 deletions
diff --git a/t/lib/b-deparse.t b/t/lib/b-deparse.t index 1f9bdb75b0..24ff3279b1 100644 --- a/t/lib/b-deparse.t +++ b/t/lib/b-deparse.t @@ -124,8 +124,8 @@ my $foo = $deparse->coderef2text(sub { { 234; }}); print "not " unless $foo =~ /{.*{.*234;.*}.*}/sm; ok; $foo = $deparse->coderef2text(sub { { 234; } continue { 123; } }); -unless ($foo =~ /{\s*{\s*234;\s*}\s*continue\s*{\s*123;\s*}/sm) { - print "# [$foo]\n\# vs expected\n# [sub { { 234; } continue { 123; } }]\n"; +unless ($foo =~ /{\s*{\s*do\s*{\s*234;\s*};\s*}\s*continue\s*{\s*123;\s*}\s*}/sm) { + print "# [$foo]\n\# vs expected\n# [{ { do { 234; }; } continue { 123; } }]\n"; print "not "; } ok; diff --git a/t/lib/selfstubber.t b/t/lib/selfstubber.t index d338489599..fd0cf0640e 100644 --- a/t/lib/selfstubber.t +++ b/t/lib/selfstubber.t @@ -10,10 +10,6 @@ use Devel::SelfStubber; my $runperl = "$^X \"-I../lib\""; -# ensure correct output ordering for system() calls - -select STDERR; $| = 1; select STDOUT; $| = 1; - print "1..12\n"; my @cleanup; diff --git a/t/op/pat.t b/t/op/pat.t index 9130454dcb..1be72346f8 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -5,7 +5,8 @@ # that does fit that format, add it to op/re_tests, not here. $| = 1; -print "1..587\n"; + +print "1..615\n"; BEGIN { chdir 't' if -d 't'; @@ -1302,6 +1303,7 @@ print "ok 247\n"; { # the second half of 20001028.003 + my $X = ''; $X =~ s/^/chr(1488)/e; print "not " unless length $X == 1 && ord($X) == 1488; print "ok 260\n"; @@ -1353,10 +1355,11 @@ print "ok 247\n"; "\0" => 'Cc', ); - for my $char (keys %s) { + for my $char (map { s/^\S+ //; $_ } + sort map { sprintf("%06x", ord($_))." $_" } keys %s) { my $class = $s{$char}; - my $code = sprintf("%04x", ord($char)); - printf "# 0x$code\n"; + my $code = sprintf("%06x", ord($char)); + printf "#\n# 0x$code\n#\n"; print "# IsAlpha\n"; if ($class =~ /^[LM]/) { print "not " unless $char =~ /\p{IsAlpha}/; @@ -1382,7 +1385,7 @@ print "ok 247\n"; print "ok $test\n"; $test++; } print "# IsASCII\n"; - if ($code <= 127) { + if ($code le '00007f') { print "not " unless $char =~ /\p{IsASCII}/; print "ok $test\n"; $test++; print "not " if $char =~ /\P{IsASCII}/; @@ -1583,3 +1586,104 @@ EOT print "not " unless ord($x) == 0x12345678 && length($x) == 1; print "ok 587\n"; } + +{ + my $x = "\x7f"; + + print "not " if $x =~ /[\x80-\xff]/; + print "ok 588\n"; + + print "not " if $x =~ /[\x80-\x{100}]/; + print "ok 589\n"; + + print "not " if $x =~ /[\x{100}]/; + print "ok 590\n"; + + print "not " if $x =~ /\p{InLatin1Supplement}/; + print "ok 591\n"; + + print "not " unless $x =~ /\P{InLatin1Supplement}/; + print "ok 592\n"; + + print "not " if $x =~ /\p{InLatinExtendedA}/; + print "ok 593\n"; + + print "not " unless $x =~ /\P{InLatinExtendedA}/; + print "ok 594\n"; +} + +{ + my $x = "\x80"; + + print "not " unless $x =~ /[\x80-\xff]/; + print "ok 595\n"; + + print "not " unless $x =~ /[\x80-\x{100}]/; + print "ok 596\n"; + + print "not " if $x =~ /[\x{100}]/; + print "ok 597\n"; + + print "not " unless $x =~ /\p{InLatin1Supplement}/; + print "ok 598\n"; + + print "not " if $x =~ /\P{InLatin1Supplement}/; + print "ok 599\n"; + + print "not " if $x =~ /\p{InLatinExtendedA}/; + print "ok 600\n"; + + print "not " unless $x =~ /\P{InLatinExtendedA}/; + print "ok 601\n"; +} + +{ + my $x = "\xff"; + + print "not " unless $x =~ /[\x80-\xff]/; + print "ok 602\n"; + + print "not " unless $x =~ /[\x80-\x{100}]/; + print "ok 603\n"; + + print "not " if $x =~ /[\x{100}]/; + print "ok 604\n"; + + print "not " unless $x =~ /\p{InLatin1Supplement}/; + print "ok 605\n"; + + print "not " if $x =~ /\P{InLatin1Supplement}/; + print "ok 606\n"; + + print "not " if $x =~ /\p{InLatinExtendedA}/; + print "ok 607\n"; + + print "not " unless $x =~ /\P{InLatinExtendedA}/; + print "ok 608\n"; +} + +{ + my $x = "\x{100}"; + + print "not " if $x =~ /[\x80-\xff]/; + print "ok 609\n"; + + print "not " unless $x =~ /[\x80-\x{100}]/; + print "ok 610\n"; + + print "not " unless $x =~ /[\x{100}]/; + print "ok 611\n"; + + print "not " if $x =~ /\p{InLatin1Supplement}/; + print "ok 612\n"; + + print "not " unless $x =~ /\P{InLatin1Supplement}/; + print "ok 613\n"; + + print "not " unless $x =~ /\p{InLatinExtendedA}/; + print "ok 614\n"; + + print "not " if $x =~ /\P{InLatinExtendedA}/; + print "ok 615\n"; +} + |