Adapt a test to changes in XS-Parse-Keyword-Builder-0.09
This commit is contained in:
parent
2973bf2d6a
commit
ec84c0f78b
|
@ -0,0 +1,43 @@
|
|||
Date: Tue, 13 Jul 2021 06:22:57 -0400
|
||||
From: Paul Evans via RT <bug-Future-AsyncAwait@rt.cpan.org>
|
||||
To: ppisar@redhat.com
|
||||
Subject: [rt.cpan.org #137589] XS-Parse-Keyword-Builder-0.09 breaks t/32compile-errors.t: Failed test 'Failure message complains about undeclared $api'
|
||||
|
||||
<URL: https://rt.cpan.org/Ticket/Display.html?id=137589 >
|
||||
|
||||
Patched. Will be in next version
|
||||
|
||||
=== modified file 't/32compile-errors.t'
|
||||
--- old/t/32compile-errors.t 2020-07-06 21:44:29 +0000
|
||||
+++ new/t/32compile-errors.t 2021-07-13 09:43:42 +0000
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
use Future::AsyncAwait;
|
||||
|
||||
+use constant HAVE_XPK_0_09 => ( $XS::Parse::Keyword::VERSION >= 0.09 );
|
||||
+
|
||||
# All of these should fail to compile but not SEGV. If we get to the end of
|
||||
# the script without segfaulting, we've passed.
|
||||
|
||||
@@ -69,6 +71,10 @@
|
||||
{
|
||||
local $@;
|
||||
|
||||
+ my $err = HAVE_XPK_0_09 ?
|
||||
+ qr/^parse failed--compilation aborted / :
|
||||
+ qr/^Global symbol "\$api" requires explicit package name/;
|
||||
+
|
||||
ok( !defined eval q'
|
||||
package segfault;
|
||||
use strict;
|
||||
@@ -82,8 +88,7 @@
|
||||
})->()->get;
|
||||
',
|
||||
'RT131487 strict-failing code fails to compile' );
|
||||
- like( "$@", qr/^Global symbol "\$api" requires explicit package name/,
|
||||
- 'Failure message complains about undeclared $api' );
|
||||
+ like( "$@", $err, 'Failure message complains about undeclared $api' );
|
||||
}
|
||||
|
||||
done_testing;
|
||||
|
|
@ -14,11 +14,14 @@
|
|||
|
||||
Name: perl-Future-AsyncAwait
|
||||
Version: 0.51
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Deferred subroutine syntax for futures
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/Future-AsyncAwait
|
||||
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Future-AsyncAwait-%{version}.tar.gz
|
||||
# Adapt a test to changes in XS-Parse-Keyword-Builder-0.09, bug #1981565,
|
||||
# CPAN RT#137589, in upstream after 0.51.
|
||||
Patch0: Future-AsyncAwait-0.51-rt137589.patch
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: perl-devel
|
||||
|
@ -152,7 +155,7 @@ Tests from %{name}. Execute them
|
|||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n Future-AsyncAwait-%{version}
|
||||
%autosetup -p1 -n Future-AsyncAwait-%{version}
|
||||
for F in \
|
||||
%if !%{optional_tests} || !%{with perl_Future_AsyncAwait_enables_Devel_MAT}
|
||||
t/82devel-mat-dumper-helper.t \
|
||||
|
@ -214,6 +217,9 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print
|
|||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Jul 13 2021 Petr Pisar <ppisar@redhat.com> - 0.51-4
|
||||
- Adapt a test to changes in XS-Parse-Keyword-Builder-0.09 (bug #1981565)
|
||||
|
||||
* Wed Jun 02 2021 Petr Pisar <ppisar@redhat.com> - 0.51-3
|
||||
- Rebuild against perl-XS-Parse-Keyword-0.06 (bug #1966787)
|
||||
|
||||
|
|
Loading…
Reference in New Issue