summaryrefslogtreecommitdiff
path: root/t/lib/compress/oneshot.pl
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/compress/oneshot.pl')
-rw-r--r--t/lib/compress/oneshot.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/lib/compress/oneshot.pl b/t/lib/compress/oneshot.pl
index 8cc9e22660..3ef6bb2186 100644
--- a/t/lib/compress/oneshot.pl
+++ b/t/lib/compress/oneshot.pl
@@ -16,7 +16,7 @@ BEGIN {
$extra = 1
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- plan tests => 944 + $extra ;
+ plan tests => 956 + $extra ;
use_ok('IO::Uncompress::AnyUncompress', qw(anyuncompress $AnyUncompressError)) ;
@@ -74,6 +74,22 @@ sub run
' Input and Output filename are the same';
}
+ {
+ my $dir = "tmpdir";
+ my $lex = new LexDir $dir ;
+ mkdir $dir, 0777 ;
+
+ $a = $Func->($dir, \$x) ;
+ is $a, undef, " $TopType returned undef";
+ like $$Error, "/input file '$dir' is a directory/",
+ ' Input filename is a directory';
+
+ $a = $Func->(\$x, $dir) ;
+ is $a, undef, " $TopType returned undef";
+ like $$Error, "/output file '$dir' is a directory/",
+ ' Output filename is a directory';
+ }
+
eval { $a = $Func->(\$in, \$in) ;} ;
like $@, mkErr("^$TopType: input and output buffer are identical"),
' Input and Output buffer are the same';