X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fwarnings%2F7fatal;h=a3e70f8d50f5403b96f81044705b54cc8fd22b37;hb=0111df86b68202837d8ca044a27bbc00d7895fb1;hp=23c88d82e39f10672a69584917b091cce7988585;hpb=00f5185623ac489efbed49ff4cbdf42316dcf5fd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/warnings/7fatal b/t/lib/warnings/7fatal index 23c88d8..a3e70f8 100644 --- a/t/lib/warnings/7fatal +++ b/t/lib/warnings/7fatal @@ -356,3 +356,71 @@ my $b ; chop $b; print STDERR "The End.\n" ; EXPECT Use of uninitialized value in scalar chop at - line 7. +######## + +use warnings FATAL => 'syntax', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings FATAL => 'all', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings FATAL => 'all', NONFATAL => 'void' ; + +my $a ; chomp $a; +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 5. +Use of uninitialized value in scalar chomp at - line 4. +######## + +use warnings FATAL => 'void', NONFATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +The End. +######## + +use warnings NONFATAL => 'void', FATAL => 'void' ; + +length "abc"; +print STDERR "The End.\n" ; +EXPECT +Useless use of length in void context at - line 4. +######## + +use warnings FATAL => 'all', NONFATAL => 'io'; +no warnings 'once'; + +open(F, " 'all', NONFATAL => 'io', FATAL => 'unopened' ; +no warnings 'once'; + +open(F, "