[perl-CGI] Make Test::Deep tests optional as it's not in the core in contrast to the CGI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 0d04b2ade92970cba9bfe341c5b04d4ef05a1392
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Wed Dec 10 14:28:41 2014 +0100

    Make Test::Deep tests optional as it's not in the core in contrast to the CGI

 CGI-4.04-Make-Test-Deep-tests-optional.patch |   39 ++++++++++++++++++++++++++
 perl-CGI.spec                                |   13 +++++++-
 2 files changed, 50 insertions(+), 2 deletions(-)
---
diff --git a/CGI-4.04-Make-Test-Deep-tests-optional.patch b/CGI-4.04-Make-Test-Deep-tests-optional.patch
new file mode 100644
index 0000000..531d116
--- /dev/null
+++ b/CGI-4.04-Make-Test-Deep-tests-optional.patch
@@ -0,0 +1,39 @@
+From 307aaf983944b09e62697e1195dee7140852c330 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx>
+Date: Wed, 10 Dec 2014 14:24:17 +0100
+Subject: [PATCH] Make Test::Deep tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx>
+---
+ t/request.t | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/t/request.t b/t/request.t
+index f03fe02..3e88226 100644
+--- a/t/request.t
++++ b/t/request.t
+@@ -4,7 +4,6 @@ use strict;
+ use warnings;
+ 
+ use Test::More tests => 44;
+-use Test::Deep;
+ 
+ use CGI ();
+ use Config;
+@@ -115,7 +114,9 @@ $q->_reset_globals;
+     is_deeply [ sort $q->$_( 'keywords' ) ], [ qw/ dragon tiger / ],
+         "$_ keywords" for qw/ param url_param /;
+ 
+-	{
++	SKIP: {
++		skip 'Test::Deep module is not available', 2 unless
++		    eval 'use Test::Deep 0.11';
+ 		# RT #54511. TODO: use Test::Warn / Test::Warnings / Test::NoWarnings
+ 		$^W++;
+ 		local $SIG{__WARN__} = sub { fail( "Got a warning: " . $_[0] ); };
+-- 
+1.9.3
+
diff --git a/perl-CGI.spec b/perl-CGI.spec
index b461aa1..c5207f7 100644
--- a/perl-CGI.spec
+++ b/perl-CGI.spec
@@ -1,10 +1,12 @@
 Name:           perl-CGI
 Summary:        Handle Common Gateway Interface requests and responses
 Version:        4.04
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        (GPL+ or Artistic) and Artistic 2.0
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-%{version}.tar.gz
+# Make Test::Deep tests optional as it's not in the core in contrast to the CGI
+Patch0:         CGI-4.04-Make-Test-Deep-tests-optional.patch
 URL:            http://search.cpan.org/dist/CGI
 BuildArch:      noarch
 BuildRequires:  perl
@@ -31,9 +33,12 @@ BuildRequires:  perl(FileHandle)
 BuildRequires:  perl(IO::File)
 BuildRequires:  perl(IO::Handle)
 BuildRequires:  perl(lib)
-BuildRequires:  perl(Test::Deep)
 BuildRequires:  perl(Test::More) >= 0.98
 BuildRequires:  perl(utf8)
+%if !%{defined perl_bootstrap}
+# Optional tests
+BuildRequires:  perl(Test::Deep) >= 0.11
+%endif
 Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 %if 0%(perl -e 'print $] >= 5.019')
 Requires:       perl(deprecate)
@@ -58,6 +63,7 @@ with built-in support for mod_perl and mod_perl2 as well as FastCGI.
 
 %prep
 %setup -q -n CGI-%{version}
+%patch0 -p1
 iconv -f iso8859-1 -t utf-8 < Changes > Changes.1
 mv Changes.1 Changes
 sed -i 's?usr/bin perl?usr/bin/perl?' t/init.t
@@ -80,6 +86,9 @@ make test
 %{_mandir}/man3/*.3*
 
 %changelog
+* Wed Dec 10 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 4.04-2
+- Make Test::Deep tests optional as it's not in the core in contrast to the CGI
+
 * Fri Sep 19 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 4.04-1
 - 4.04 bump
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux