From c819b3774094459bd3ffbc579130d64876b87078 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Tue, 29 Nov 2016 17:39:29 +0100
Subject: Fix a no-warnings test

---
 ...not-use-done_testing-with-Test-NoWarnings.patch | 44 ++++++++++++++++++++++
 perl-Scalar-Does.spec                              |  8 +++-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 
Scalar-Does-0.202-Do-not-use-done_testing-with-Test-NoWarnings.patch

diff --git 
a/Scalar-Does-0.202-Do-not-use-done_testing-with-Test-NoWarnings.patch 
b/Scalar-Does-0.202-Do-not-use-done_testing-with-Test-NoWarnings.patch
new file mode 100644
index 0000000..2b1a9e3
--- /dev/null
+++ b/Scalar-Does-0.202-Do-not-use-done_testing-with-Test-NoWarnings.patch
@@ -0,0 +1,44 @@
+From edc5b114a098df5fa50f92882073c73c34bedaf2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Tue, 29 Nov 2016 17:34:29 +0100
+Subject: [PATCH] Do not use done_testing with Test::NoWarnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Test::NoWarnings does not work with done_testing correctly and the
+mistaken usage in t/09warnings.t becomes visible since
+Test-Simple-1.302064.
+
+This patch replaces done_testing call with proper test plan
+definition.
+
+CPAN RT#119030
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ t/09warnings.t | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/t/09warnings.t b/t/09warnings.t
+index 3ee58eb..114b5a6 100644
+--- a/t/09warnings.t
++++ b/t/09warnings.t
+@@ -27,7 +27,7 @@ the same terms as the Perl 5 programming language system 
itself.
+ 
+ use strict;
+ use warnings;
+-use Test::More;
++use Test::More tests => 1;
+ use Test::Requires "List::MoreUtils";
+ 
+ BEGIN {
+@@ -40,5 +40,3 @@ use Test::NoWarnings;
+ $^W = 1;
+ require Scalar::Does;
+ Scalar::Does::does(undef, 'ARRAY');
+-
+-done_testing(1);
+-- 
+2.7.4
+
diff --git a/perl-Scalar-Does.spec b/perl-Scalar-Does.spec
index a770a24..abdfd94 100644
--- a/perl-Scalar-Does.spec
+++ b/perl-Scalar-Does.spec
@@ -1,6 +1,6 @@
 Name:           perl-Scalar-Does
 Version:        0.202
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Check an object implements an interface
 # CONTRIBUTING: CC-BY-SA
 # COPYRIGHT:    Public Domain
@@ -9,6 +9,8 @@ License:        (GPL+ or Artistic) and CC-BY-SA and Public 
Domain
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Scalar-Does/
 Source0:        
http://www.cpan.org/authors/id/T/TO/TOBYINK/Scalar-Does-%{version}.tar.gz
+# Fix a no-warnings test, bug #1399514, CPAN RT#119030
+Patch0:         
Scalar-Does-0.202-Do-not-use-done_testing-with-Test-NoWarnings.patch
 BuildArch:      noarch
 BuildRequires:  findutils
 BuildRequires:  make
@@ -72,6 +74,7 @@ delivers Scalar::Does Perl module that can do it.
 
 %prep
 %setup -q -n Scalar-Does-%{version}
+%patch0 -p1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
@@ -93,5 +96,8 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Tue Nov 29 2016 Petr Pisar <ppi...@redhat.com> - 0.202-2
+- Fix a no-warnings test (bug #1399514)
+
 * Thu Jun 23 2016 Petr Pisar <ppi...@redhat.com> 0.202-1
 - Specfile autogenerated by cpanspec 1.78.
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-Scalar-Does.git/commit/?h=master&id=c819b3774094459bd3ffbc579130d64876b87078
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to