From 2425a39797fcc694082a4f6f0be27a2ec736c6b3 Mon Sep 17 00:00:00 2001
From: hongjinghao <hongjinghao@huawei.com>
Date: Tue, 4 Jun 2024 17:26:43 +0800
Subject: [PATCH] fix test case failure caused by zlib

The patching of zlib in openEuler with upstream bug fixes aligns its functionality with newer versions of zlib. However, the version number of zlib within openEuler remains unchanged, indicating the older version. Consequently, the test cases for perl-IO-Compress, which rely on the zlib version number to determine expected outcomes, will fail. To address this, perl-IO-Compress must be updated to accommodate the changes in zlib and remove the versioning-based checks from its test suite.

This bugfix commit for zlib in openEuler resulted in a change in its function behavior:
https://gitee.com/src-openeuler/zlib/pulls/46

---
 cpan/Compress-Raw-Zlib/t/02zlib.t | 4 ++--
 cpan/IO-Compress/t/cz-03zlib-v1.t | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpan/Compress-Raw-Zlib/t/02zlib.t b/cpan/Compress-Raw-Zlib/t/02zlib.t
index 64c8944..4c445c9 100644
--- a/cpan/Compress-Raw-Zlib/t/02zlib.t
+++ b/cpan/Compress-Raw-Zlib/t/02zlib.t
@@ -490,7 +490,7 @@ SKIP:
         last if $status == Z_STREAM_END or $status != Z_OK ;
     }
 
-    cmp_ok $status, '==', Z_DATA_ERROR ;
+    cmp_ok $status, '==', Z_STREAM_END ;
     is $GOT, $goodbye ;
 
 
@@ -514,7 +514,7 @@ SKIP:
     is length($rest), $len2, "expected compressed output";
 
     $GOT = '';
-    cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR";
+    cmp_ok $k->inflate($rest, $GOT), '==', Z_STREAM_END, "inflate returns Z_DATA_ERROR";
     is $GOT, $goodbye ;
 }
 
diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t
index 9b75f9b..f2757c0 100644
--- a/cpan/IO-Compress/t/cz-03zlib-v1.t
+++ b/cpan/IO-Compress/t/cz-03zlib-v1.t
@@ -700,7 +700,7 @@ EOM
 
     ($GOT, $status) = $k->inflate($rest) ;
 
-    ok $status == Z_DATA_ERROR ;
+    ok $status == Z_STREAM_END ;
     ok $Z . $GOT eq $goodbye ;
 }
 
-- 
2.33.0

