summaryrefslogtreecommitdiff
path: root/cpan/IO-Compress/t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-09-27 13:04:58 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-09-27 13:04:58 +0100
commit6625b4731a37f834cd655039c5b8c19bbed23dba (patch)
treec4e302374c858fc375efd42460c255a0295e5d8c /cpan/IO-Compress/t
parent1590a3458ab2c49f1dba9e6ba74cd6da22a1cc72 (diff)
downloadperl-6625b4731a37f834cd655039c5b8c19bbed23dba.tar.gz
Update IO-Compress to CPAN version 2.066
[DELTA] 2.066 21 Sept 2014 * IO::Uncompress::Gzip Documentation of ExtraFlags stated the XFL values for BEST_COMPRESSION and BEST_SPEED use the values 2 & 4 respectively. They should be 4 & 2. Code for setting XFL was correct. * RT #95494: IO::Uncompress::Gunzip: Can no longer gunzip to in-memory file handle
Diffstat (limited to 'cpan/IO-Compress/t')
-rw-r--r--cpan/IO-Compress/t/000prereq.t2
-rw-r--r--cpan/IO-Compress/t/compress/oneshot.pl27
2 files changed, 26 insertions, 3 deletions
diff --git a/cpan/IO-Compress/t/000prereq.t b/cpan/IO-Compress/t/000prereq.t
index 4aca4a07cf..39d7e49167 100644
--- a/cpan/IO-Compress/t/000prereq.t
+++ b/cpan/IO-Compress/t/000prereq.t
@@ -25,7 +25,7 @@ BEGIN
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- my $VERSION = '2.064';
+ my $VERSION = '2.066';
my @NAMES = qw(
Compress::Raw::Bzip2
Compress::Raw::Zlib
diff --git a/cpan/IO-Compress/t/compress/oneshot.pl b/cpan/IO-Compress/t/compress/oneshot.pl
index 1e56b56725..43d9c02f64 100644
--- a/cpan/IO-Compress/t/compress/oneshot.pl
+++ b/cpan/IO-Compress/t/compress/oneshot.pl
@@ -16,7 +16,7 @@ BEGIN {
$extra = 1
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- plan tests => 995 + $extra ;
+ plan tests => 1002 + $extra ;
use_ok('IO::Uncompress::AnyUncompress', qw(anyuncompress $AnyUncompressError)) ;
@@ -1583,7 +1583,7 @@ sub run
{
- # check setting $/
+ # check setting $\
my $CompFunc = getTopFuncRef($CompressClass);
my $UncompFunc = getTopFuncRef($UncompressClass);
@@ -1600,7 +1600,30 @@ sub run
}
+ SKIP:
+ {
+ #95494: IO::Uncompress::Gunzip: Can no longer gunzip to in-memory file handle
+
+ skip "open filehandle to buffer not supported in Perl $]", 7
+ if $] < 5.008 ;
+ my $CompFunc = getTopFuncRef($CompressClass);
+ my $UncompFunc = getTopFuncRef($UncompressClass);
+
+ my $input = "hello world";
+ my $compressed ;
+ ok open my $fh_in1, '<', \$input ;
+ ok open my $fh_out1, '>', \$compressed ;
+ ok &$CompFunc($fh_in1 => $fh_out1), ' Compressed ok' ;
+
+ my $output;
+ ok open my $fh_in2, '<', \$compressed ;
+ ok open my $fh_out2, '>', \$output ;
+
+ ok &$UncompFunc($fh_in2 => $fh_out2), ' UnCompressed ok' ;
+ is $output, $input, "round trip ok" ;
+ }
}
+
# TODO add more error cases
1;