File: tests-version-skew.patch

package info (click to toggle)
libio-compress-perl 2.204-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,896 kB
  • sloc: perl: 15,125; sh: 26; makefile: 10; xml: 1
file content (30 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: avoid version skew in t/cz-03zlib-v1.t
 Choose expected behaviour based on runtime zlib version instead of build
 time one.
Origin: vendor
Bug-Debian: https://bugs.debian.org/1026753
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2022-12-23

--- a/t/cz-03zlib-v1.t
+++ b/t/cz-03zlib-v1.t
@@ -14,7 +14,8 @@
 use CompTestUtils;
 use Symbol;
 
-use constant ZLIB_1_2_12_0 => 0x12C0;
+use constant ZLIB_1_2_12_0 => '1.2.12';
+my $Zlib_ver = Compress::Raw::Zlib::zlib_version ;
 
 BEGIN
 {
@@ -704,7 +705,7 @@
 
     # Z_STREAM_END returned by 1.12.2, Z_DATA_ERROR for older zlib
     # always Z_STREAM_ENDin zlib_ng
-    if (ZLIB_VERNUM >= ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
+    if ($Zlib_ver gt ZLIB_1_2_12_0 || Compress::Raw::Zlib::is_zlibng)
     {
         cmp_ok $status, '==', Z_STREAM_END ;
     }