From bcac0eda35b46d0d6348e0144fde64194c245b04 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 15 Nov 2013 12:08:05 +0000 Subject: [PATCH] Update to 0.40 - New upstream release 0.40 - Test::Class failed on Test::Builder 0.99 (CPAN RT#89473) - This release by RJBS -> update source URL - Drop now-redundant test patch - Use a patch to fix the documentation character encoding - Drop %defattr, redundant since rpm 4.4 - Make the %files list more explicit - No need to remove empty directories from the buildroot - Don't use macros for commands - Work around annoying noise from TAP::Parser::SourceHandler::Perl version 3.28 (CPAN RT#85106) --- .gitignore | 5 +- ...s-0.39-Adjust-to-Test-Simple-0.98_04.patch | 84 ------------------- perl-Test-Class-UTF8.patch | 11 +++ perl-Test-Class.spec | 52 +++++++----- sources | 2 +- 5 files changed, 44 insertions(+), 110 deletions(-) delete mode 100644 Test-Class-0.39-Adjust-to-Test-Simple-0.98_04.patch create mode 100644 perl-Test-Class-UTF8.patch diff --git a/.gitignore b/.gitignore index 9660f96..a647bef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -Test-Class-0.33.tar.gz -/Test-Class-0.36.tar.gz -/Test-Class-0.38.tar.gz -/Test-Class-0.39.tar.gz +/Test-Class-[0-9.]*.tar.gz diff --git a/Test-Class-0.39-Adjust-to-Test-Simple-0.98_04.patch b/Test-Class-0.39-Adjust-to-Test-Simple-0.98_04.patch deleted file mode 100644 index fadd79c..0000000 --- a/Test-Class-0.39-Adjust-to-Test-Simple-0.98_04.patch +++ /dev/null @@ -1,84 +0,0 @@ -From eceb5cde6609858e700cbeb2fd787109ce263e9c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -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 - - - -Signed-off-by: Petr PísaÅ™ ---- - 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 - diff --git a/perl-Test-Class-UTF8.patch b/perl-Test-Class-UTF8.patch new file mode 100644 index 0000000..283b2f5 --- /dev/null +++ b/perl-Test-Class-UTF8.patch @@ -0,0 +1,11 @@ +--- Changes ++++ Changes +@@ -175,7 +175,7 @@ + - Fixed the installation errors that everybody has been rightly + complaining about for the last year: + - Prerequisities in requires, not build_requires +- - Tests no longer rely on hard coded test output (thanks Mart’n ++ - Tests no longer rely on hard coded test output (thanks Martín + Ferrari and Nicholas Clark for patches) + - Require appropriate version of Test::Exception + - Added link to del.icio.us perl+testing links in POD diff --git a/perl-Test-Class.spec b/perl-Test-Class.spec index df2b705..561d93c 100644 --- a/perl-Test-Class.spec +++ b/perl-Test-Class.spec @@ -1,15 +1,13 @@ Name: perl-Test-Class -Version: 0.39 -Release: 3%{?dist} +Version: 0.40 +Release: 1%{?dist} Summary: Easily create test classes in an xUnit/JUnit style 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) +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Class-%{version}.tar.gz +Patch0: perl-Test-Class-UTF8.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl BuildRequires: perl(Module::Build) @@ -34,7 +32,7 @@ BuildRequires: perl(Test::Exception) >= 0.25 BuildRequires: perl(Test::More) >= 0.78 # Optional tests: BuildRequires: perl(Contextual::Return) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Attribute::Handlers) >= 0.77 Requires: perl(MRO::Compat) >= 0.11 Requires: perl(Storable) >= 2.04 @@ -49,40 +47,52 @@ 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 {} \; +find -type f -exec chmod -c -x {} \; -# There's a non-ISO char, iconv isn't able to convert -%{__perl} -pi -e 's/Mart.*n/Martín/' < Changes > Changes~ -mv Changes~ Changes +# Fix character encoding in documentation +%patch0 %build -%{__perl} Build.PL installdirs=vendor +perl Build.PL installdirs=vendor ./Build %install rm -rf $RPM_BUILD_ROOT - ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 -find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; - -%{_fixperms} $RPM_BUILD_ROOT/* +%{_fixperms} $RPM_BUILD_ROOT %check +# Avoid annoying noise from TAP::Parser::SourceHandler::Perl version 3.28 (CPAN RT#85106) +export PERL5LIB="$(pwd)/no-such-directory" + ./Build test %clean rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) %doc Changes LICENSE README -%{perl_vendorlib}/* -%{_mandir}/man3/* +%{perl_vendorlib}/Test/ +%{_mandir}/man3/Test::Class.3pm* +%{_mandir}/man3/Test::Class::Load.3pm* +%{_mandir}/man3/Test::Class::MethodInfo.3pm* %changelog +* Fri Nov 15 2013 Paul Howarth - 0.40-1 +- Update to 0.40 + - Test::Class failed on Test::Builder 0.99 (CPAN RT#89473) +- This release by RJBS -> update source URL +- Drop now-redundant test patch +- Use a patch to fix the documentation character encoding +- Drop %%defattr, redundant since rpm 4.4 +- Make the %%files list more explicit +- No need to remove empty directories from the buildroot +- Don't use macros for commands +- Work around annoying noise from TAP::Parser::SourceHandler::Perl version 3.28 + (CPAN RT#85106) + * Sun Aug 04 2013 Fedora Release Engineering - 0.39-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - Adjust to Test-Simple 0.98_04 (bug #992734) diff --git a/sources b/sources index b249db6..aa58cc6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f296e57ede695bff76e4f1336e4c49d3 Test-Class-0.39.tar.gz +22e4387daec4117c8a56767790059951 Test-Class-0.40.tar.gz