[perl-Test-Mojibake] Update to 0.8
Paul Howarth
pghmcfc at fedoraproject.org
Sat Jan 26 22:46:24 UTC 2013
commit 094e57091cdda059acf9a0bebac05797619237f2
Author: Paul Howarth <paul at city-fan.org>
Date: Sat Jan 26 22:45:17 2013 +0000
Update to 0.8
- New upstream release 0.8
- Fixed cyclic t/ deps
- Added the standalone scan_mojibake utility
- Listed Unicode::CheckUTF8 as a recommended prerequisite
- Recognize utf8::all
- Passes perlcritic harsh
- Drop BR: perl(File::Spec)
- BR: perl(File::Spec::Functions), perl(Pod::Usage) and perl(Test::Script)
- BR: perl(Test::Pod::LinkCheck) where available
- Perl::Critic ≥ 1.094 now needed for the 'equivalent_modules' parameter in
TestingAndDebugging::RequireUseStrict, unavailable in EPEL-5
- Update patch for building with old Test::More versions
- Drop %defattr, redundant since rpm 4.4
Test-Mojibake-0.4-old-Test::More.patch | 74 ------------------------------
Test-Mojibake-0.8-old-Test::More.patch | 77 ++++++++++++++++++++++++++++++++
perl-Test-Mojibake.spec | 41 ++++++++++++-----
sources | 2 +-
4 files changed, 106 insertions(+), 88 deletions(-)
---
diff --git a/Test-Mojibake-0.8-old-Test::More.patch b/Test-Mojibake-0.8-old-Test::More.patch
new file mode 100644
index 0000000..e604ff0
--- /dev/null
+++ b/Test-Mojibake-0.8-old-Test::More.patch
@@ -0,0 +1,77 @@
+diff -up Test-Mojibake-0.8/t/06-pp-vs-xs.t.orig Test-Mojibake-0.8/t/06-pp-vs-xs.t
+--- Test-Mojibake-0.8/t/06-pp-vs-xs.t.orig 2013-01-26 20:28:12.000000000 +0000
++++ Test-Mojibake-0.8/t/06-pp-vs-xs.t 2013-01-26 22:17:47.038813730 +0000
+@@ -2,7 +2,7 @@
+ use strict;
+ use warnings qw(all);
+
+-use Test::More;
++use Test::More 'no_plan';
+
+ ## no critic (ProhibitPackageVars, ProtectPrivateSubs)
+
+@@ -13,7 +13,6 @@ BEGIN {
+
+ unless ($Test::Mojibake::use_xs) {
+ diag('No XS module detected, will fallback to PP implementation!');
+- done_testing(2);
+ exit;
+ }
+
+@@ -36,8 +35,6 @@ ok($t0->iters > $t1->iters, 'XS faster t
+
+ diag(sprintf('XS/PP speed ratio is %0.2f', $t0->iters / $t1->iters));
+
+-done_testing(7);
+-
+ sub run {
+ my $i = 0;
+ for (@buf) {
+diff -up Test-Mojibake-0.8/t/07-broken-utf8.t.orig Test-Mojibake-0.8/t/07-broken-utf8.t
+--- Test-Mojibake-0.8/t/07-broken-utf8.t.orig 2013-01-26 20:28:12.000000000 +0000
++++ Test-Mojibake-0.8/t/07-broken-utf8.t 2013-01-26 22:17:47.038813730 +0000
+@@ -27,7 +27,7 @@ my @tests = (
+ ["11-overlong-5" => 0 => \"\xfc\x80\x80\x80\x80\xaf"],
+ );
+
++plan tests => scalar @tests;
++
+ ok(Test::Mojibake::_detect_utf8($_->[2]) == $_->[1], $_->[0])
+ for @tests;
+-
+-done_testing(scalar @tests);
+diff -up Test-Mojibake-0.8/t/release-cpan-changes.t.orig Test-Mojibake-0.8/t/release-cpan-changes.t
+--- Test-Mojibake-0.8/t/release-cpan-changes.t.orig 2013-01-26 20:28:12.000000000 +0000
++++ Test-Mojibake-0.8/t/release-cpan-changes.t 2013-01-26 22:17:47.038813730 +0000
+@@ -1,15 +1,11 @@
+ #!perl
+
++use Test::More;
++
+ BEGIN {
+- unless ($ENV{RELEASE_TESTING}) {
+- require Test::More;
+- Test::More::plan(skip_all => 'these tests are for release candidate testing');
+- }
++ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
++ eval 'use Test::CPAN::Changes';
++ plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+ }
+
+-
+-use Test::More;
+-eval 'use Test::CPAN::Changes';
+-plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+ changes_ok();
+-done_testing();
+diff -up Test-Mojibake-0.8/t/release-test-version.t.orig Test-Mojibake-0.8/t/release-test-version.t
+--- Test-Mojibake-0.8/t/release-test-version.t.orig 2013-01-26 22:17:47.000000000 +0000
++++ Test-Mojibake-0.8/t/release-test-version.t 2013-01-26 22:18:26.069722569 +0000
+@@ -26,5 +26,6 @@ push @imports, $params
+
+ Test::Version->import(@imports);
+
++plan tests => 2;
++
+ version_all_ok();
+-done_testing;
diff --git a/perl-Test-Mojibake.spec b/perl-Test-Mojibake.spec
index 5ab7b0c..617fa43 100644
--- a/perl-Test-Mojibake.spec
+++ b/perl-Test-Mojibake.spec
@@ -7,12 +7,8 @@
# noarch, but to avoid debug* files interfering with manifest test:
%global debug_package %{nil}
-# TODO:
-#
-# BuildRequires: perl(Test::Pod::LinkCheck) when available
-
Name: perl-Test-Mojibake
-Version: 0.7
+Version: 0.8
Release: 1%{?dist}
Summary: Check your source for encoding misbehavior
Group: Development/Libraries
@@ -20,7 +16,7 @@ License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Test-Mojibake/
Source0: http://search.cpan.org/CPAN/authors/id/S/SY/SYP/Test-Mojibake-%{version}.tar.gz
Patch0: Test-Mojibake-0.4-no-Test::Version.patch
-Patch1: Test-Mojibake-0.4-old-Test::More.patch
+Patch1: Test-Mojibake-0.8-old-Test::More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# ===================================================================
@@ -29,11 +25,9 @@ BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
# ===================================================================
# Module requirements
-#
-# META.yml suggests that perl(open) and perl(common::sense) are
-# required, but they aren't really
# ===================================================================
-BuildRequires: perl(File::Spec)
+BuildRequires: perl(File::Spec::Functions)
+BuildRequires: perl(Pod::Usage)
BuildRequires: perl(Test::Builder)
# ===================================================================
# Optional module requirements
@@ -44,6 +38,7 @@ BuildRequires: perl(Unicode::CheckUTF8)
# ===================================================================
BuildRequires: perl(Test::Builder::Tester)
BuildRequires: perl(Test::More)
+BuildRequires: perl(Test::Script)
# ===================================================================
# Author/Release test requirements
#
@@ -60,13 +55,13 @@ BuildRequires: perl(Test::HasVersion)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: perl(Test::MinimumVersion)
BuildRequires: perl(Test::NoTabs)
-BuildRequires: perl(Test::Perl::Critic)
-BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Pod)
+BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Portability::Files)
BuildRequires: perl(Test::Synopsis)
# Modules only available from EL-6
%if 0%{?fedora} || 0%{?rhel} > 5
+BuildRequires: perl(Test::Perl::Critic), perl(Perl::Critic) >= 1.094
BuildRequires: perl(Test::Vars)
%endif
# Modules only available from EL-7
@@ -75,6 +70,10 @@ BuildRequires: perl(Perl::Critic::Policy::Modules::ProhibitModuleShebang)
BuildRequires: perl(Test::CPAN::Changes)
BuildRequires: perl(Test::Version)
%endif
+# Modules only available from F-18, EL-7
+%if 0%{?fedora} > 17 || 0%{?rhel} > 6
+BuildRequires: perl(Test::Pod::LinkCheck)
+%endif
%endif
# ===================================================================
# Runtime requirements
@@ -150,12 +149,28 @@ sed -i -e 's|release-minimum-version.t|t/release-minimum-version.t|' MANIFEST
rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
%doc Changes LICENSE README
+%{_bindir}/scan_mojibake
%{perl_vendorlib}/Test/
+%{_mandir}/man1/scan_mojibake.1*
%{_mandir}/man3/Test::Mojibake.3pm*
%changelog
+* Sat Jan 26 2013 Paul Howarth <paul at city-fan.org> - 0.8-1
+- Update to 0.8
+ - Fixed cyclic t/ deps
+ - Added the standalone scan_mojibake utility
+ - Listed Unicode::CheckUTF8 as a recommended prerequisite
+ - Recognize utf8::all
+ - Passes perlcritic harsh
+- Drop BR: perl(File::Spec)
+- BR: perl(File::Spec::Functions), perl(Pod::Usage) and perl(Test::Script)
+- BR: perl(Test::Pod::LinkCheck) where available
+- Perl::Critic ≥ 1.094 now needed for the 'equivalent_modules' parameter in
+ TestingAndDebugging::RequireUseStrict, unavailable in EPEL-5
+- Update patch for building with old Test::More versions
+- Drop %%defattr, redundant since rpm 4.4
+
* Mon Oct 1 2012 Paul Howarth <paul at city-fan.org> - 0.7-1
- Update to 0.7
- Fixed multiple =encoding behavior
diff --git a/sources b/sources
index 46c5346..bd89081 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e3a6197312ea0a8d8edd9db4aa90bc30 Test-Mojibake-0.7.tar.gz
+0baa9275af39fa7f60c62b5b2b3110bd Test-Mojibake-0.8.tar.gz
More information about the perl-devel
mailing list