Adjust tests to zlib-1.2.11
This commit is contained in:
parent
f4847d991b
commit
899da56545
95
IO-Compress-2.070-Adapt-tests-to-zlib-1.2.11.patch
Normal file
95
IO-Compress-2.070-Adapt-tests-to-zlib-1.2.11.patch
Normal file
@ -0,0 +1,95 @@
|
||||
From a30130055928e5979c35aceee75cc3becfe3ad22 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Tue, 7 Feb 2017 17:23:29 +0100
|
||||
Subject: [PATCH] Adapt tests to zlib 1.2.11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
CPAN RT#120134
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
t/cz-03zlib-v1.t | 13 +++++++++++--
|
||||
t/cz-06gzsetp.t | 4 +++-
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/t/cz-03zlib-v1.t b/t/cz-03zlib-v1.t
|
||||
index a85ed10..e070d46 100755
|
||||
--- a/t/cz-03zlib-v1.t
|
||||
+++ b/t/cz-03zlib-v1.t
|
||||
@@ -23,10 +23,10 @@ BEGIN
|
||||
|
||||
my $count = 0 ;
|
||||
if ($] < 5.005) {
|
||||
- $count = 453 ;
|
||||
+ $count = 456 ;
|
||||
}
|
||||
else {
|
||||
- $count = 471 ;
|
||||
+ $count = 474 ;
|
||||
}
|
||||
|
||||
|
||||
@@ -721,6 +721,9 @@ EOM
|
||||
|
||||
($Answer, $status) = $x->deflate($hello) ;
|
||||
ok $status == Z_OK ;
|
||||
+ ($X, $status) = $x->flush(Z_BLOCK) ;
|
||||
+ ok $status == Z_OK ;
|
||||
+ $Answer .= $X ;
|
||||
$input .= $hello;
|
||||
|
||||
# error cases
|
||||
@@ -747,6 +750,9 @@ EOM
|
||||
($X, $status) = $x->deflate($goodbye) ;
|
||||
ok $status == Z_OK ;
|
||||
$Answer .= $X ;
|
||||
+ ($X, $status) = $x->flush(Z_BLOCK) ;
|
||||
+ ok $status == Z_OK ;
|
||||
+ $Answer .= $X ;
|
||||
$input .= $goodbye;
|
||||
|
||||
# change only Level
|
||||
@@ -759,6 +765,9 @@ EOM
|
||||
($X, $status) = $x->deflate($goodbye) ;
|
||||
ok $status == Z_OK ;
|
||||
$Answer .= $X ;
|
||||
+ ($X, $status) = $x->flush(Z_BLOCK) ;
|
||||
+ ok $status == Z_OK ;
|
||||
+ $Answer .= $X ;
|
||||
$input .= $goodbye;
|
||||
|
||||
# change only Strategy
|
||||
diff --git a/t/cz-06gzsetp.t b/t/cz-06gzsetp.t
|
||||
index b2cc687..45869a0 100644
|
||||
--- a/t/cz-06gzsetp.t
|
||||
+++ b/t/cz-06gzsetp.t
|
||||
@@ -39,7 +39,7 @@ my $ver = Compress::Zlib::zlib_version();
|
||||
plan skip_all => "gzsetparams needs zlib 1.0.6 or better. You have $ver\n"
|
||||
if ZLIB_VERNUM() < 0x1060 ;
|
||||
|
||||
-plan tests => 51 + $extra ;
|
||||
+plan tests => 55 + $extra ;
|
||||
|
||||
# Check zlib_version and ZLIB_VERSION are the same.
|
||||
SKIP: {
|
||||
@@ -65,6 +65,7 @@ SKIP: {
|
||||
|
||||
$input .= $hello;
|
||||
is $x->gzwrite($hello), $len_hello, "gzwrite returned $len_hello" ;
|
||||
+ cmp_ok $x->gzflush(Z_BLOCK), '==', Z_OK, "flush before gzsetparams is ok";
|
||||
|
||||
# Error cases
|
||||
eval { $x->gzsetparams() };
|
||||
@@ -120,6 +121,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
|
||||
|
||||
my $input .= $hello;
|
||||
is $x->write($hello), $len_hello, "wrote $len_hello bytes" ;
|
||||
+ ok $x->flush(Z_BLOCK), "flush before deflateParams is ok";
|
||||
|
||||
# Change both Level & Strategy
|
||||
ok $x->deflateParams(Z_BEST_SPEED, Z_HUFFMAN_ONLY), "deflateParams ok";
|
||||
--
|
||||
2.7.4
|
||||
|
@ -3,12 +3,15 @@
|
||||
|
||||
Name: perl-IO-Compress
|
||||
Version: 2.070
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Read and write compressed data
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/IO-Compress/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/IO-Compress-%{version}.tar.gz
|
||||
# Adjust tests to zlib-1.2.11, bug #1420012, CPAN RT#120134, can be removed
|
||||
# after fixing perl-Compress-Raw-Zlib properly (CPAN RT#119762)
|
||||
Patch0: IO-Compress-2.070-Adapt-tests-to-zlib-1.2.11.patch
|
||||
BuildArch: noarch
|
||||
# Module Build
|
||||
BuildRequires: coreutils
|
||||
@ -81,6 +84,7 @@ included with the IO-Compress distribution:
|
||||
|
||||
%prep
|
||||
%setup -q -n IO-Compress-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
# Remove spurious exec permissions
|
||||
chmod -c -x lib/IO/Uncompress/{Adapter/Identity,RawInflate}.pm
|
||||
@ -131,6 +135,9 @@ make test COMPRESS_ZLIB_RUN_%{?with_long_tests:ALL}%{!?with_long_tests:MOST}=1
|
||||
%{_mandir}/man3/IO::Uncompress::*.3*
|
||||
|
||||
%changelog
|
||||
* Fri Feb 10 2017 Petr Pisar <ppisar@redhat.com> - 2.070-2
|
||||
- Adjust tests to zlib-1.2.11 (bug #1420012)
|
||||
|
||||
* Thu Dec 29 2016 Paul Howarth <paul@city-fan.org> - 2.070-1
|
||||
- Update to 2.070
|
||||
- Fix prototype errors while lazy loading File::GlobMapper (CPAN RT#117675)
|
||||
|
Loading…
Reference in New Issue
Block a user