diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-25 11:01:49 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-01-25 11:01:49 +0000 |
commit | eb1102fcca2230364ceadea29bd8e87ee51b15fa (patch) | |
tree | bbe40957b80489b669b86133adb740b5d811cf73 /t | |
parent | 3ed9f8f7de3dfc6ca29c4acc02b797c9dd51d971 (diff) | |
download | perl-eb1102fcca2230364ceadea29bd8e87ee51b15fa.tar.gz |
Integrate mainline
All but ../lib/Unicode/UCD.t pass.
p4raw-id: //depot/perlio@14412
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/2use | 2 | ||||
-rwxr-xr-x | t/lib/warnings/9enabled | 4 | ||||
-rw-r--r-- | t/lib/warnings/toke | 11 | ||||
-rwxr-xr-x | t/op/each.t | 21 | ||||
-rwxr-xr-x | t/op/stat.t | 2 | ||||
-rwxr-xr-x | t/op/universal.t | 4 | ||||
-rw-r--r-- | t/run/fresh_perl.t | 10 | ||||
-rw-r--r-- | t/uni/fold.t | 2 |
8 files changed, 42 insertions, 14 deletions
diff --git a/t/lib/warnings/2use b/t/lib/warnings/2use index e25d43adbb..b700ef70dc 100644 --- a/t/lib/warnings/2use +++ b/t/lib/warnings/2use @@ -8,7 +8,7 @@ __END__ # check illegal category is caught use warnings 'this-should-never-be-a-warning-category' ; EXPECT -unknown warnings category 'this-should-never-be-a-warning-category' at - line 3 +Unknown warnings category 'this-should-never-be-a-warning-category' at - line 3 BEGIN failed--compilation aborted at - line 3. ######## diff --git a/t/lib/warnings/9enabled b/t/lib/warnings/9enabled index c3f2e394d1..fdce8cd84f 100755 --- a/t/lib/warnings/9enabled +++ b/t/lib/warnings/9enabled @@ -332,7 +332,7 @@ eval { warnings::warn("fred", "joe") } ; print $@ ; EXPECT Usage: warnings::warn([category,] 'message') at - line 4 -unknown warnings category 'fred' at - line 6 +Unknown warnings category 'fred' at - line 6 ######## # check warnings::warnif @@ -343,7 +343,7 @@ eval { warnings::warnif("fred", "joe") } ; print $@ ; EXPECT Usage: warnings::warnif([category,] 'message') at - line 4 -unknown warnings category 'fred' at - line 6 +Unknown warnings category 'fred' at - line 6 ######## --FILE-- abc.pm diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 70ff3dbbf6..01e31f8612 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -727,3 +727,14 @@ no warnings 'ambiguous'; "@mjd_previously_unused_array"; EXPECT Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3. +######## +# toke.c +# The \q should warn, the \_ should NOT warn. +use warnings 'misc'; +"foo" =~ /\q/; +"bar" =~ /\_/; +no warnings 'misc'; +"foo" =~ /\q/; +"bar" =~ /\_/; +EXPECT +Unrecognized escape \q passed through at - line 4. diff --git a/t/op/each.t b/t/op/each.t index 8212264d55..cb4cd2d9ab 100755 --- a/t/op/each.t +++ b/t/op/each.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 34; +plan tests => 39; $h{'abc'} = 'ABC'; $h{'def'} = 'DEF'; @@ -168,3 +168,22 @@ for (keys %u) { { { use bytes; ok (bytes::length($d) == $ol) } } + +{ + my %u; + my $u0 = pack("U0U", 0x00FF); + my $b0 = "\xC3\xBF"; # 0xCB 0xBF is U+00FF in UTF-8 + my $u1 = pack("U0U", 0x0100); + my $b1 = "\xC4\x80"; # 0xC4 0x80 is U+0100 in UTF-8 + + $u{$u0} = 1; + $u{$b0} = 2; + $u{$u1} = 3; + $u{$b1} = 4; + + is(scalar keys %u, 4, "four different Unicode keys"); + is($u{$u0}, 1, "U+00FF -> 1"); + is($u{$b0}, 2, "U+00C3 U+00BF -> 2"); + is($u{$u1}, 3, "U+0100 -> 3 "); + is($u{$b1}, 4, "U+00C4 U+0080 -> 4"); +} diff --git a/t/op/stat.t b/t/op/stat.t index 1c0d4b25ba..82566a8d1d 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -200,7 +200,7 @@ SKIP: { unless -d '/dev' && -r '/dev' && -x '/dev'; my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l"; - my $CMD = "$LS /dev"; + my $CMD = "$LS /dev 2>/dev/null"; my $DEV = qx($CMD); skip "$CMD failed", 3 if $DEV eq ''; diff --git a/t/op/universal.t b/t/op/universal.t index 00e99fc4e1..2e31d78b19 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -9,7 +9,7 @@ BEGIN { $| = 1; } -print "1..91\n"; +print "1..93\n"; $a = {}; bless $a, "Bob"; @@ -57,8 +57,10 @@ package main; $a = new Alice; test $a->isa("Alice"); +test $a->isa("main::Alice"); # check that alternate class names work test $a->isa("Bob"); +test $a->isa("main::Bob"); test $a->isa("Female"); diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index d59d0da7b8..41aa1eca58 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -779,16 +779,12 @@ sub new { } sub DESTROY { my $self = shift; - dbmclose(%{$self->{'LT'}}); - return 1; -} -package main; -$test = Foo->new(); # must be package var -END -{ + dbmclose(%{$self->{'LT'}}); 1 while unlink 'dbmtest'; 1 while unlink <dbmtest.*>; print "ok\n"; } +package main; +$test = Foo->new(); # must be package var EXPECT ok diff --git a/t/uni/fold.t b/t/uni/fold.t index 76e1639065..a068e6511a 100644 --- a/t/uni/fold.t +++ b/t/uni/fold.t @@ -7,7 +7,7 @@ use File::Spec; my $CF = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", "unicore"), - "CaseFold.txt"); + "CaseFolding.txt"); if (open(CF, $CF)) { my @CF; |