Adjust to Test-Simple 0.98_04

epel9
Petr Písař 12 years ago
parent 4b342ea138
commit bfd2413913

@ -0,0 +1,84 @@
From eceb5cde6609858e700cbeb2fd787109ce263e9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 7 Aug 2013 10:58:43 +0200
Subject: [PATCH] Adjust to Test-Simple 0.98_04
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
<https://rt.cpan.org/Public/Bug/Display.html?id=85004>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/fail2.t | 19 ++++++++++++++-----
t/runtests_die.t | 17 +++++++++++++----
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/t/fail2.t b/t/fail2.t
index 0231685..26d6f54 100644
--- a/t/fail2.t
+++ b/t/fail2.t
@@ -23,14 +23,23 @@ sub _test_new : Test(3) {
package main;
$ENV{TEST_VERBOSE}=0;
-my $identifier = ($Test::More::VERSION < 0.88) ? 'object' : 'thing';
+my $identifier = 'undef';
+if ($Test::More::VERSION < 0.88) {
+ $identifier = 'The object';
+} elsif ($Test::More::VERSION < 0.9804) {
+ $identifier = 'The thing';
+}
+my $quote = q{'};
+if ($Test::More::VERSION < 0.9804) {
+ $quote = q{};
+}
-test_out("not ok 1 - The $identifier isa Object");
+test_out("not ok 1 - $identifier isa $quote" . "Object" . "$quote");
test_out("not ok 2 - cannot create Objects");
-test_fail(-12);
+test_fail(-21);
test_err( "# (in Object::Test->_test_new)" );
-test_err(qr/#\s+The $identifier isn't defined\n/);
-test_fail(-15);
+test_err(qr/#\s+\Q$identifier\E isn't defined\n/);
+test_fail(-24);
test_err( "# (in Object::Test->_test_new)" );
Object::Test->runtests;
diff --git a/t/runtests_die.t b/t/runtests_die.t
index 238ec21..953bd1d 100755
--- a/t/runtests_die.t
+++ b/t/runtests_die.t
@@ -21,14 +21,23 @@ use Test::Builder::Tester tests => 1;
$ENV{TEST_VERBOSE}=0;
my $filename = sub { return (caller)[1] }->();
-my $identifier = ($Test::More::VERSION < 0.88) ? 'object' : 'thing';
+my $identifier = 'undef';
+if ($Test::More::VERSION < 0.88) {
+ $identifier = 'The object';
+} elsif ($Test::More::VERSION < 0.9804) {
+ $identifier = 'The thing';
+}
+my $quote = q{'};
+if ($Test::More::VERSION < 0.9804) {
+ $quote = q{};
+}
-test_out( "not ok 1 - The $identifier isa Object");
+test_out( "not ok 1 - $identifier isa $quote" . "Object" . "$quote");
test_err( "# Failed test ($filename at line 15)");
test_err( "# (in Foo->test_object)" );
-test_err( "# The $identifier isn't defined");
+test_err( "# $identifier isn't defined");
test_out( "not ok 2 - test_object died (could not create object)");
-test_err( "# Failed test ($filename at line 33)");
+test_err( "# Failed test ($filename at line 42)");
test_err( "# (in Foo->test_object)" );
Foo->runtests;
test_test("early die handled");
--
1.8.1.4

@ -6,6 +6,8 @@ License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Test-Class/
Source0: http://www.cpan.org/authors/id/A/AD/ADIE/Test-Class-%{version}.tar.gz
# Adjust to Test-Simple 0.98_04, bug #992734, CPAN RT#85004
Patch0: Test-Class-0.39-Adjust-to-Test-Simple-0.98_04.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -47,6 +49,7 @@ your code in an xUnit style.
%prep
%setup -q -n Test-Class-%{version}
%patch0 -p1
# Fix up broken permissions
find -type f -exec chmod -x {} \;
@ -82,6 +85,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.39-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
- Adjust to Test-Simple 0.98_04 (bug #992734)
* Mon Jul 22 2013 Petr Pisar <ppisar@redhat.com> - 0.39-2
- Perl 5.18 rebuild

Loading…
Cancel
Save