diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2002-06-20 18:14:12 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-20 15:27:18 +0000 |
commit | 6e9af7e4283affa5138ab8f50e01b3144acd68ca (patch) | |
tree | f57e517d5e07f3f5e90b174add6216721208bd2a /t/lib | |
parent | 353813d9d162685fa077a818008763d730617d20 (diff) | |
download | perl-6e9af7e4283affa5138ab8f50e01b3144acd68ca.tar.gz |
RE: mixing FATAL and non-FATAL warnings
From: "Paul Marquess" <Paul.Marquess@btinternet.com>
Message-ID: <AIEAJICLCBDNAAOLLOKLOEJAEOAA.Paul.Marquess@btinternet.com>
p4raw-id: //depot/perl@17325
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/warnings/7fatal | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/t/lib/warnings/7fatal b/t/lib/warnings/7fatal index 23c88d82e3..a3e70f8d50 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, "<true\ncd"); +close "fred" ; +print STDERR "The End.\n" ; +EXPECT +Unsuccessful open on filename containing newline at - line 5. +close() on unopened filehandle fred at - line 6. +The End. +######## + +use warnings FATAL => 'all', NONFATAL => 'io', FATAL => 'unopened' ; +no warnings 'once'; + +open(F, "<true\ncd"); +close "fred" ; +print STDERR "The End.\n" ; +EXPECT +Unsuccessful open on filename containing newline at - line 5. +close() on unopened filehandle fred at - line 6. |