diff options
Diffstat (limited to 'contrib/perl5/t/lib/fatal.t')
-rwxr-xr-x | contrib/perl5/t/lib/fatal.t | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/contrib/perl5/t/lib/fatal.t b/contrib/perl5/t/lib/fatal.t deleted file mode 100755 index f00b876..0000000 --- a/contrib/perl5/t/lib/fatal.t +++ /dev/null @@ -1,36 +0,0 @@ -#!./perl -w - -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; - print "1..15\n"; -} - -use strict; -use Fatal qw(open close :void opendir); - -my $i = 1; -eval { open FOO, '<lkjqweriuapofukndajsdlfjnvcvn' }; -print "not " unless $@ =~ /^Can't open/; -print "ok $i\n"; ++$i; - -my $foo = 'FOO'; -for ('$foo', "'$foo'", "*$foo", "\\*$foo") { - eval qq{ open $_, '<$0' }; - print "not " if $@; - print "ok $i\n"; ++$i; - - print "not " if $@ or scalar(<$foo>) !~ m|^#!./perl|; - print "ok $i\n"; ++$i; - eval qq{ close FOO }; - print "not " if $@; - print "ok $i\n"; ++$i; -} - -eval { opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' }; -print "not " unless $@ =~ /^Can't open/; -print "ok $i\n"; ++$i; - -eval { my $a = opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' }; -print "not " if $@ =~ /^Can't open/; -print "ok $i\n"; ++$i; |