pghmcfc pushed to perl-Test-Mojibake (f23). "Update to 1.1 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Sep 3 18:32:42 UTC 2015


From 8163a766ef1498ba427d4ebc6bda60be7256da22 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Thu, 3 Sep 2015 19:22:36 +0100
Subject: Update to 1.1

- New upstream release 1.1
  - Distribution maintenance
  - Handle the case where all_files_encoding_ok has no files to test by
    skipping all tests
- Re-enable use of Test::Vars with Perl 5.22
- Avoid the Kwalitee test if we don't have a recent enough Test::Kwalitee
- Update patches as needed

diff --git a/Test-Mojibake-1.0-no-Test::Version.patch b/Test-Mojibake-1.0-no-Test::Version.patch
deleted file mode 100644
index 1b7d88b..0000000
--- a/Test-Mojibake-1.0-no-Test::Version.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- t/release-test-version.t
-+++ t/release-test-version.t
-@@ -10,8 +10,8 @@ use strict;
- use warnings;
- use Test::More;
- 
--# generated by Dist::Zilla::Plugin::Test::Version 0.002004
--BEGIN { eval "use Test::Version; 1;" or die $@; }
-+eval 'use Test::Version';
-+plan skip_all => 'Test::Version required' if $@;
- 
- my @imports = ( 'version_all_ok' );
- 
-@@ -28,4 +28,4 @@ Test::Version->import(@imports);
- 
- plan tests => 2;
- 
--version_all_ok;
-+version_all_ok();
diff --git a/Test-Mojibake-1.0-old-Test::More.patch b/Test-Mojibake-1.0-old-Test::More.patch
deleted file mode 100644
index 16be524..0000000
--- a/Test-Mojibake-1.0-old-Test::More.patch
+++ /dev/null
@@ -1,131 +0,0 @@
---- t/06-pp-vs-xs.t
-+++ t/06-pp-vs-xs.t
-@@ -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) {
---- t/07-broken-utf8.t
-+++ t/07-broken-utf8.t
-@@ -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);
---- t/release-cpan-changes.t
-+++ t/release-cpan-changes.t
-@@ -1,19 +1,17 @@
- #!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 $@;
-+  plan tests => 5;
- }
- 
- 
- use strict;
- use warnings;
- 
--use Test::More 0.96 tests => 2;
- use_ok('Test::CPAN::Changes');
--subtest 'changes_ok' => sub {
--    changes_file_ok('Changes');
--};
--done_testing();
-+changes_file_ok('Changes');
---- t/release-no-tabs.t
-+++ t/release-no-tabs.t
-@@ -11,7 +11,7 @@ use warnings;
- 
- # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.08
- 
--use Test::More 0.88;
-+use Test::More;
- use Test::NoTabs;
- 
- my @files = (
-@@ -64,5 +64,6 @@ my @files = (
-     't/release-unused-vars.t'
- );
- 
-+plan tests => scalar @files;
-+
- notabs_ok($_) foreach @files;
--done_testing;
---- t/release-test-version.t
-+++ t/release-test-version.t
-@@ -26,5 +26,6 @@ push @imports, $params
- 
- Test::Version->import(@imports);
- 
-+plan tests => 2;
-+
- version_all_ok;
--done_testing;
---- t/release-unused-vars.t
-+++ t/release-unused-vars.t
-@@ -1,22 +1,15 @@
- #!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 { require Test::Vars };
-+  plan(skip_all => 'Test::Vars required for testing for unused vars')
-+    if $@;
- }
- 
-+Test::Vars->import;
- 
--use Test::More 0.96 tests => 1;
--eval { require Test::Vars };
--
--SKIP: {
--    skip 1 => 'Test::Vars required for testing for unused vars'
--        if $@;
--    Test::Vars->import;
--
--    subtest 'unused vars' => sub {
- all_vars_ok();
--    };
--};
diff --git a/Test-Mojibake-1.1-no-Test::Version.patch b/Test-Mojibake-1.1-no-Test::Version.patch
new file mode 100644
index 0000000..b9b21f3
--- /dev/null
+++ b/Test-Mojibake-1.1-no-Test::Version.patch
@@ -0,0 +1,18 @@
+--- t/author-test-version.t
++++ t/author-test-version.t
+@@ -11,7 +11,8 @@
+ use Test::More;
+ 
+ # generated by Dist::Zilla::Plugin::Test::Version 1.05
+-use Test::Version;
++eval 'use Test::Version';
++plan skip_all => 'Test::Version required' if $@;
+ 
+ my @imports = qw( version_all_ok );
+ 
+@@ -30,4 +31,4 @@
+ 
+ plan tests => 2;
+ 
+-version_all_ok;
++version_all_ok();
diff --git a/Test-Mojibake-1.1-old-Test::More.patch b/Test-Mojibake-1.1-old-Test::More.patch
new file mode 100644
index 0000000..6de7454
--- /dev/null
+++ b/Test-Mojibake-1.1-old-Test::More.patch
@@ -0,0 +1,164 @@
+--- t/06-pp-vs-xs.t
++++ t/06-pp-vs-xs.t
+@@ -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) {
+--- t/07-broken-utf8.t
++++ t/07-broken-utf8.t
+@@ -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);
+--- t/author-eol.t
++++ t/author-eol.t
+@@ -11,7 +11,7 @@ use warnings;
+ 
+ # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18
+ 
+-use Test::More 0.88;
++use Test::More;
+ use Test::EOL;
+ 
+ my @files = (
+@@ -65,5 +65,6 @@ my @files = (
+     't/release-unused-vars.t'
+ );
+ 
++plan tests => scalar @files;
++
+ eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
+-done_testing;
+--- t/author-no-tabs.t
++++ t/author-no-tabs.t
+@@ -11,7 +11,7 @@ use warnings;
+ 
+ # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15
+ 
+-use Test::More 0.88;
++use Test::More;
+ use Test::NoTabs;
+ 
+ my @files = (
+@@ -65,5 +65,6 @@ my @files = (
+     't/release-unused-vars.t'
+ );
+ 
++plan tests => scalar @files;
++
+ notabs_ok($_) foreach @files;
+-done_testing;
+--- t/author-test-version.t
++++ t/author-test-version.t
+@@ -28,5 +28,6 @@ push @imports, $params
+ 
+ Test::Version->import(@imports);
+ 
++plan tests => 2;
++
+ version_all_ok;
+-done_testing;
+--- t/release-cpan-changes.t
++++ t/release-cpan-changes.t
+@@ -1,19 +1,17 @@
+ #!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 $@;
++  plan tests => 5;
+ }
+ 
+ 
+ use strict;
+ use warnings;
+ 
+-use Test::More 0.96 tests => 2;
+ use_ok('Test::CPAN::Changes');
+-subtest 'changes_ok' => sub {
+-    changes_file_ok('Changes');
+-};
+-done_testing();
++changes_file_ok('Changes');
+--- t/release-kwalitee.t
++++ t/release-kwalitee.t
+@@ -9,9 +9,5 @@ BEGIN {
+ # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.11
+ use strict;
+ use warnings;
+-use Test::More 0.88;
+-use Test::Kwalitee 1.21 'kwalitee_ok';
+-
+-kwalitee_ok();
+-
+-done_testing;
++use Test::More;
++use Test::Kwalitee;
+--- t/release-unused-vars.t
++++ t/release-unused-vars.t
+@@ -1,22 +1,15 @@
+ #!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 { require Test::Vars };
++  plan(skip_all => 'Test::Vars required for testing for unused vars')
++    if $@;
+ }
+ 
++Test::Vars->import;
+ 
+-use Test::More 0.96 tests => 1;
+-eval { require Test::Vars };
+-
+-SKIP: {
+-    skip 1 => 'Test::Vars required for testing for unused vars'
+-        if $@;
+-    Test::Vars->import;
+-
+-    subtest 'unused vars' => sub {
+ all_vars_ok();
+-    };
+-};
diff --git a/perl-Test-Mojibake.spec b/perl-Test-Mojibake.spec
index d3b1872..33a4e65 100644
--- a/perl-Test-Mojibake.spec
+++ b/perl-Test-Mojibake.spec
@@ -6,29 +6,34 @@
 %global debug_package %{nil}
 
 Name:		perl-Test-Mojibake
-Version:	1.0
-Release:	7%{?dist}
+Version:	1.1
+Release:	1%{?dist}
 Summary:	Check your source for encoding misbehavior
 Group:		Development/Libraries
 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-1.0-no-Test::Version.patch
-Patch1:		Test-Mojibake-1.0-old-Test::More.patch
+Patch0:		Test-Mojibake-1.1-no-Test::Version.patch
+Patch1:		Test-Mojibake-1.1-old-Test::More.patch
 Patch2:		Test-Mojibake-1.0-old-Test::Pod.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:	noarch
 # ===================================================================
 # Module build requirements
 # ===================================================================
+BuildRequires:	coreutils
+BuildRequires:	findutils
+BuildRequires:	make
 BuildRequires:	perl
-BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
+BuildRequires:	perl(ExtUtils::MakeMaker)
 # ===================================================================
 # Module requirements
 # ===================================================================
 BuildRequires:	perl(File::Spec::Functions)
 BuildRequires:	perl(Pod::Usage)
+BuildRequires:	perl(strict)
 BuildRequires:	perl(Test::Builder)
+BuildRequires:	perl(warnings)
 # ===================================================================
 # Optional module requirements
 # ===================================================================
@@ -36,6 +41,7 @@ BuildRequires:	perl(Unicode::CheckUTF8)
 # ===================================================================
 # Regular test suite requirements
 # ===================================================================
+BuildRequires:	perl(blib)
 BuildRequires:	perl(Test::Builder::Tester)
 BuildRequires:	perl(Test::More)
 BuildRequires:	perl(Test::Script)
@@ -52,7 +58,6 @@ BuildRequires:	perl(Test::CPAN::Meta)
 BuildRequires:	perl(Test::DistManifest)
 BuildRequires:	perl(Test::EOL)
 BuildRequires:	perl(Test::HasVersion)
-BuildRequires:	perl(Test::Kwalitee)
 BuildRequires:	perl(Test::MinimumVersion)
 BuildRequires:	perl(Test::NoTabs)
 BuildRequires:	perl(Test::Pod)
@@ -62,12 +67,8 @@ 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
-# Disable using of Test::Vars, because it failed with Perl 5.22.0
-# There is not a properly fix for it yet
-%if ! 0%(perl -e 'print $] >= 5.022')
 BuildRequires:	perl(Test::Vars)
 %endif
-%endif
 # Modules only available from EL-7
 %if 0%{?fedora} || 0%{?rhel} > 6
 BuildRequires:	perl(Test::CPAN::Changes)
@@ -76,6 +77,7 @@ BuildRequires:	perl(Test::Version)
 # Modules only available from EL-8
 %if 0%{?fedora} || 0%{?rhel} > 7
 BuildRequires:	perl(Perl::Critic::Policy::Modules::ProhibitModuleShebang)
+BuildRequires:	perl(Test::Kwalitee) >= 1.21
 BuildRequires:	perl(Test::Pod::LinkCheck)
 %endif
 %endif
@@ -143,7 +145,10 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
 %{_fixperms} %{buildroot}
 
 %check
-make test %{!?perl_bootstrap:AUTHOR_TESTING=1 RELEASE_TESTING=1}
+make test %{!?perl_bootstrap:AUTHOR_TESTING=1 RELEASE_TESTING=1} \
+%if ! 0%{?fedora} && 0%{?rhel} < 8
+	TEST_FILES="$(echo $(find t/ -name '*.t' | grep -Fv release-kwalitee.t))"
+%endif
 
 %clean
 rm -rf %{buildroot}
@@ -153,9 +158,18 @@ rm -rf %{buildroot}
 %{_bindir}/scan_mojibake
 %{perl_vendorlib}/Test/
 %{_mandir}/man1/scan_mojibake.1*
-%{_mandir}/man3/Test::Mojibake.3pm*
+%{_mandir}/man3/Test::Mojibake.3*
 
 %changelog
+* Thu Sep  3 2015 Paul Howarth <paul at city-fan.org> - 1.1-1
+- Update to 1.1
+  - Distribution maintenance
+  - Handle the case where all_files_encoding_ok has no files to test by
+    skipping all tests
+- Re-enable use of Test::Vars with Perl 5.22
+- Avoid the Kwalitee test if we don't have a recent enough Test::Kwalitee
+- Update patches as needed
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index b309433..39e5cd5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9415ec8bc0d5e5fd7c7eb431ebc3035b  Test-Mojibake-1.0.tar.gz
+8e7a564723d21674c8927adb9388827c  Test-Mojibake-1.1.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Test-Mojibake.git/commit/?h=f23&id=8163a766ef1498ba427d4ebc6bda60be7256da22


More information about the perl-devel mailing list