diff options
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' ); |