diff --git a/Test-Unit-0.25-Adapt-tests-to-Perl-5.30.patch b/Test-Unit-0.25-Adapt-tests-to-Perl-5.30.patch new file mode 100644 index 0000000..c81310f --- /dev/null +++ b/Test-Unit-0.25-Adapt-tests-to-Perl-5.30.patch @@ -0,0 +1,49 @@ +From 04f6b165bd158ccf156e220f6aaa33b58a15c175 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 3 Jun 2019 15:43:31 +0200 +Subject: [PATCH] Adapt tests to Perl 5.30 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It seems Perl started to understand a numerical value of hexadecimal +strings like '0xF'. This happens since Perl commit: + + commit ce6f496d720f6206455628425320badd95b07372 (HEAD, refs/bisect/bad) + Author: sisyphus + Date: Wed Aug 1 22:33:38 2018 +1000 + + PATCH: [perl #41202] text->float gives wrong answer + + This changes to use Perl_strtod() when available, and that turns out to + be the key to fixing this bug. + + S_mulexp10() is removed from embed.fnc to avoid repeating the + complicated prerequisites for defining Perl_strtod(). This works + because this static function already was defined before use in + numeric.c, and always called in full form without using a macro. + + James Keenan fixed a file permissions problem originally introduced by + this commit, but the fix has been squashed into it. + +Signed-off-by: Petr Písař +--- + t/tlib/AssertTest.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/tlib/AssertTest.pm b/t/tlib/AssertTest.pm +index 42fa860..bd0820b 100644 +--- a/t/tlib/AssertTest.pm ++++ b/t/tlib/AssertTest.pm +@@ -34,7 +34,7 @@ sub test_numericness { + my %tests = + ( 1 => 't', + 0 => 't', +- '0xF00' => 'f', # controversial? but if you +=10 then it's == 10 ++ '0xF00' => ($] lt '5.02902') ? 'f' : 't', + '15e7' => 't', + '15E7' => 't', + "not 0" => 'f', +-- +2.20.1 + diff --git a/perl-Test-Unit.spec b/perl-Test-Unit.spec index 32dc806..3bf1dd9 100644 --- a/perl-Test-Unit.spec +++ b/perl-Test-Unit.spec @@ -1,6 +1,6 @@ Name: perl-Test-Unit Version: 0.25 -Release: 32%{?dist} +Release: 33%{?dist} Summary: The PerlUnit testing framework License: GPL+ or Artistic @@ -12,6 +12,8 @@ Patch0: tests5.14.patch Patch1: perl5.16.patch # Fix random test failures with perl 5.18, bug #1104134, CPAN RT#87017 Patch2: Test-Unit-0.25-Accept-all-family-differences-in-the-AssertTest-test.patch +# Adapt tests to Perl 5.30, bug #1716422, CPAN RT#129738 +Patch3: Test-Unit-0.25-Adapt-tests-to-Perl-5.30.patch BuildArch: noarch BuildRequires: perl-generators @@ -46,6 +48,7 @@ Gamma. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 sed -i 's/\r//' examples/Experimental/Sample.pm chmod a+x TkTestRunner.pl TestRunner.pl @@ -72,6 +75,9 @@ make test %changelog +* Mon Jun 03 2019 Petr Pisar - 0.25-33 +- Adapt tests to Perl 5.30 (bug #1716422) + * Fri May 31 2019 Jitka Plesnikova - 0.25-32 - Perl 5.30 rebuild