Adjust tests to perl-5.18

This commit is contained in:
Petr Písař 2013-07-12 14:46:59 +02:00
parent 1864ca8f21
commit ebf0e4491b
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From a8d39e4eb350fb1a30fcbdbb3f8f110fe2a708fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 12 Jul 2013 14:32:28 +0200
Subject: [PATCH] Perl 5.18.0 has changed error message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
<https://rt.cpan.org/Public/Bug/Display.html?id=86890>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/parent.t | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/t/parent.t b/t/parent.t
index 401fe39..f3b8533 100755
--- a/t/parent.t
+++ b/t/parent.t
@@ -58,10 +58,18 @@ is( $Eval2::VERSION, '1.02' );
eval q{use parent 'reallyReAlLyNotexists'};
-like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/}, 'baseclass that does not exist');
+like( $@,
+ ($] < 5.018) ?
+ q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/} :
+ q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(you may need to install the reallyReAlLyNotexists module\) \(\@INC contains:/},
+ 'baseclass that does not exist');
eval q{use parent 'reallyReAlLyNotexists'};
-like( $@, q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/}, ' still failing on 2nd load');
+like( $@,
+ ($] < 5.018) ?
+ q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(\@INC contains:/} :
+ q{/^Can't locate reallyReAlLyNotexists.pm in \@INC \(you may need to install the reallyReAlLyNotexists module\) \(\@INC contains:/},
+ ' still failing on 2nd load');
{
my $warning;
local $SIG{__WARN__} = sub { $warning = shift };
--
1.8.1.4

View File

@ -1,12 +1,14 @@
Name: perl-parent
Epoch: 1
Version: 0.225
Release: 243%{?dist}
Release: 244%{?dist}
Summary: Establish an ISA relationship with base classes at compile time
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/parent/
Source0: http://search.cpan.org/CPAN/authors/id/C/CO/CORION/parent-%{version}.tar.gz
# Adjust tests to perl-5.18, CPAN RT#86890
Patch0: parent-0.225-Perl-5.18.0-has-changed-error-message.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
@ -29,6 +31,7 @@ from those modules at the same time. Mostly similar in effect to:
%prep
%setup -q -n parent-%{version}
%patch0 -p1
# Remove spurious exec permissions
chmod -c -x Changes lib/parent.pm
@ -55,6 +58,9 @@ rm -rf %{buildroot}
%{_mandir}/man3/parent.3pm*
%changelog
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:0.225-244
- Adjust tests to perl-5.18 (CPAN RT#86890)
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.225-243
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild