12 plan(skip_all => "Destroy not supported in Perl $]")
13 if $] == 5.008 || ( $] >= 5.005 && $] < 5.006) ;
15 # use Test::NoWarnings, if available
18 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
20 plan tests => 7 + $extra ;
28 my $CompressClass = identify();
29 my $UncompressClass = getInverse($CompressClass);
30 my $Error = getErrorRef($CompressClass);
31 my $UnError = getErrorRef($UncompressClass);
33 title "Testing $CompressClass";
36 # Check that the class destructor will call close
38 my $lex = new LexFile my $name ;
47 ok my $x = new $CompressClass $name, -AutoClose => 1 ;
49 ok $x->write($hello) ;
52 is anyUncompress($name), $hello ;
56 # Tied filehandle destructor
59 my $lex = new LexFile my $name ;
66 my $fh = new IO::File "> $name" ;
69 ok my $x = new $CompressClass $fh, -AutoClose => 1 ;
74 ok anyUncompress($name) eq $hello ;