diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2002-03-25 13:01:44 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-25 14:10:20 +0000 |
commit | 99ef548ba710eb2617804c989e4d5fdae1f04f37 (patch) | |
tree | 8295e26e58493474c765534c211849219ab506c7 /lib/open.t | |
parent | 696235b60874be65fe029a39969f44a0133ec2f8 (diff) | |
download | perl-99ef548ba710eb2617804c989e4d5fdae1f04f37.tar.gz |
warnings for perlio + others
From: "Paul Marquess" <paul_marquess@yahoo.co.uk>
Message-ID: <AIEAJICLCBDNAAOLLOKLMEKNEAAA.paul_marquess@yahoo.co.uk>
p4raw-id: //depot/perl@15485
Diffstat (limited to 'lib/open.t')
-rw-r--r-- | lib/open.t | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/open.t b/lib/open.t index 5897c2b32f..bb5d8296a5 100644 --- a/lib/open.t +++ b/lib/open.t @@ -6,7 +6,7 @@ BEGIN { require Config; import Config; } -use Test::More tests => 15; +use Test::More tests => 16; # open::import expects 'open' as its first argument, but it clashes with open() sub import { @@ -32,7 +32,13 @@ local $SIG{__WARN__} = sub { }; # and it shouldn't be able to find this discipline -eval{ import( 'IN', 'macguffin' ) }; +$warn = ''; +eval q{ no warnings 'layer'; use open IN => ':macguffin' ; }; +is( $warn, '', + 'should not warn about unknown discipline with bad discipline provided' ); + +$warn = ''; +eval q{ use warnings 'layer'; use open IN => ':macguffin' ; }; like( $warn, qr/Unknown discipline layer/, 'should warn about unknown discipline with bad discipline provided' ); |