diff options
author | 2013-03-25 20:06:16 +0000 | |
---|---|---|
committer | 2013-03-25 20:06:16 +0000 | |
commit | 898184e3e61f9129feb5978fad5a8c6865f00b92 (patch) | |
tree | 56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/t/lib/warnings/pp | |
parent | PGSHIFT -> PAGE_SHIFT (diff) | |
download | wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.tar.xz wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.zip |
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu/usr.bin/perl/t/lib/warnings/pp')
-rw-r--r-- | gnu/usr.bin/perl/t/lib/warnings/pp | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/gnu/usr.bin/perl/t/lib/warnings/pp b/gnu/usr.bin/perl/t/lib/warnings/pp index d1581446f00..89ebcbcbc47 100644 --- a/gnu/usr.bin/perl/t/lib/warnings/pp +++ b/gnu/usr.bin/perl/t/lib/warnings/pp @@ -6,9 +6,6 @@ Attempt to use reference as lvalue in substr $a = "ab" ; $b = \$a ; substr($b, 1,1) = $b - Use of uninitialized value in ref-to-glob cast [pp_rv2gv()] - *b = *{ undef()} - Use of uninitialized value in scalar dereference [pp_rv2sv()] my $a = undef ; my $b = $$a @@ -46,12 +43,23 @@ EXPECT Attempt to use reference as lvalue in substr at - line 5. ######## # pp.c -use warnings 'uninitialized' ; -*x = *{ undef() }; -no warnings 'uninitialized' ; -*y = *{ undef() }; +use warnings 'misc' ; +@a = qw( a b c ); +splice(@a, 4, 0, 'e') ; +@a = qw( a b c ); +splice(@a, 4, 1) ; +@a = qw( a b c ); +splice(@a, 4) ; +no warnings 'misc' ; +@a = qw( a b c ); +splice(@a, 4, 0, 'e') ; +@a = qw( a b c ); +splice(@a, 4, 1) ; +@a = qw( a b c ); +splice(@a, 4) ; EXPECT -Use of uninitialized value in ref-to-glob cast at - line 3. +splice() offset past end of array at - line 4. +splice() offset past end of array at - line 6. ######## # pp.c use warnings 'uninitialized'; @@ -88,6 +96,18 @@ EXPECT Constant subroutine foo undefined at - line 4. ######## # pp.c +use utf8; +use open qw( :utf8 :std ); +use warnings 'misc'; +sub ฝᶱ () { 1 } +undef &ฝᶱ; +no warnings 'misc'; +sub ƚ () { 2 } +undef &ƚ; +EXPECT +Constant subroutine ฝᶱ undefined at - line 6. +######## +# pp.c use warnings 'misc'; $foo = sub () { 3 }; undef &$foo; |