From 7fbac55ba3e54272ee3404bf25d4e9bfe5005248 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova <jples...@redhat.com> Date: Tue, 15 Mar 2016 13:53:10 +0100 Subject: Update patch which makes Test::Deep optional (BZ #1317867)
--- CGI-4.27-Make-Test-Deep-tests-optional.patch | 149 --------------------------- CGI-4.28-Make-Test-Deep-tests-optional.patch | 149 +++++++++++++++++++++++++++ perl-CGI.spec | 7 +- 3 files changed, 154 insertions(+), 151 deletions(-) delete mode 100644 CGI-4.27-Make-Test-Deep-tests-optional.patch create mode 100644 CGI-4.28-Make-Test-Deep-tests-optional.patch diff --git a/CGI-4.27-Make-Test-Deep-tests-optional.patch b/CGI-4.27-Make-Test-Deep-tests-optional.patch deleted file mode 100644 index 8ff3036..0000000 --- a/CGI-4.27-Make-Test-Deep-tests-optional.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff -up CGI-4.27/t/cgi.t.orig CGI-4.27/t/cgi.t ---- CGI-4.27/t/cgi.t.orig 2016-03-02 08:43:05.000000000 +0100 -+++ CGI-4.27/t/cgi.t 2016-03-02 15:52:50.825729857 +0100 -@@ -6,7 +6,6 @@ use strict; - use warnings; - - use Test::More tests => 25; --use Test::Deep; - - use CGI (); - -@@ -27,11 +26,15 @@ is( $q->PrintHeader,$q->header,'PrintHea - is( $q->HtmlTop,$q->start_html,'HtmlTop' ); - is( $q->HtmlBot,$q->end_html,'HtmlBot' ); - --cmp_deeply( -+SKIP: { -+ skip 'Test::Deep module is not available', 1 unless -+ eval 'use Test::Deep 0.11; 1'; -+ cmp_deeply( - [ my @params = CGI::SplitParam( "foo\0bar" ) ], - [ qw/ foo bar /], - 'SplitParam' --); -+ ); -+} - - ok( $q->MethGet,'MethGet' ); - ok( ! $q->MethPost,'MethPost' ); -@@ -60,13 +63,17 @@ $CGI::CLOSE_UPLOAD_FILES = 0; - ok( $q->close_upload_files( 1 ),'close_upload_files' ); - is( $CGI::CLOSE_UPLOAD_FILES,1,' ... sets $CGI::CLOSE_UPLOAD_FILES' ); - --cmp_deeply( -+SKIP: { -+ skip 'Test::Deep module is not available', 1 unless -+ eval 'use Test::Deep 0.11; 1'; -+ cmp_deeply( - $q->default_dtd, - [ - '-//W3C//DTD HTML 4.01 Transitional//EN', - 'http://www.w3.org/TR/html4/loose.dtd' - ], - 'default_dtd' --); -+ ); -+} - - ok( ! $q->private_tempfiles,'private_tempfiles' ); -diff -up CGI-4.27/t/param_list_context.t.orig CGI-4.27/t/param_list_context.t ---- CGI-4.27/t/param_list_context.t.orig 2016-03-02 08:48:20.000000000 +0100 -+++ CGI-4.27/t/param_list_context.t 2016-03-02 15:52:50.825729857 +0100 -@@ -4,7 +4,7 @@ use strict; - use warnings; - - use Test::More; --use Test::Deep; -+ - use Test::Warn; - - use CGI (); -@@ -43,11 +43,15 @@ warnings_are - " ... but we only warn once", - ; - --cmp_deeply( -+SKIP: { -+ skip 'Test::Deep module is not available', 1 unless -+ eval 'use Test::Deep 0.11; 1'; -+ cmp_deeply( - [ sort @params ], - [ qw/ checkers chess / ], - 'CGI::param()', --); -+ ); -+} - - warnings_are - { @params = $q->multi_param('game') } -@@ -55,11 +59,15 @@ warnings_are - "no warnings calling multi_param" - ; - --cmp_deeply( -+SKIP: { -+ skip 'Test::Deep module is not available', 1 unless -+ eval 'use Test::Deep 0.11; 1'; -+ cmp_deeply( - [ sort @params ], - [ qw/ checkers chess / ], - 'CGI::multi_param' --); -+ ); -+} - - $CGI::LIST_CONTEXT_WARN = 0; - -diff -up CGI-4.27/t/request.t.orig CGI-4.27/t/request.t ---- CGI-4.27/t/request.t.orig 2016-03-02 08:16:46.000000000 +0100 -+++ CGI-4.27/t/request.t 2016-03-02 15:52:50.825729857 +0100 -@@ -4,7 +4,6 @@ use strict; - use warnings; - - use Test::More tests => 71; --use Test::Deep; - - use CGI (); - use Config; -@@ -117,7 +116,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', 3 unless -+ (eval 'use Test::Deep 0.11; 1'); - $^W++; - - CGI::_reset_globals; -diff -up CGI-4.27/t/util.t.orig CGI-4.27/t/util.t ---- CGI-4.27/t/util.t.orig 2015-12-15 18:12:19.000000000 +0100 -+++ CGI-4.27/t/util.t 2016-03-02 15:52:50.825729857 +0100 -@@ -6,7 +6,6 @@ - $| = 1; - - use Test::More tests => 80; --use Test::Deep; - use Config; - use_ok ( 'CGI::Util', qw( - escape -@@ -68,6 +67,10 @@ for ( 1 .. 20 ) { - %args, - ); - -+ SKIP: { -+ skip 'Test::Deep module is not available', 1 unless -+ eval 'use Test::Deep 0.11; 1'; -+ - cmp_deeply( - [ @ordered ], - [ -@@ -83,6 +86,7 @@ for ( 1 .. 20 ) { - ], - 'rearrange not sensitive to hash key ordering' - ); -+ } - } - - ok( CGI::Util::utf8_chr( "1",1 ),'utf8_chr' ); diff --git a/CGI-4.28-Make-Test-Deep-tests-optional.patch b/CGI-4.28-Make-Test-Deep-tests-optional.patch new file mode 100644 index 0000000..e72ca86 --- /dev/null +++ b/CGI-4.28-Make-Test-Deep-tests-optional.patch @@ -0,0 +1,149 @@ +diff -up CGI-4.27/t/cgi.t.orig CGI-4.27/t/cgi.t +--- CGI-4.27/t/cgi.t.orig 2016-03-02 08:43:05.000000000 +0100 ++++ CGI-4.27/t/cgi.t 2016-03-02 15:52:50.825729857 +0100 +@@ -6,7 +6,6 @@ use strict; + use warnings; + + use Test::More tests => 25; +-use Test::Deep; + + use CGI (); + +@@ -27,11 +26,15 @@ is( $q->PrintHeader,$q->header,'PrintHea + is( $q->HtmlTop,$q->start_html,'HtmlTop' ); + is( $q->HtmlBot,$q->end_html,'HtmlBot' ); + +-cmp_deeply( ++SKIP: { ++ skip 'Test::Deep module is not available', 1 unless ++ eval 'use Test::Deep 0.11; 1'; ++ cmp_deeply( + [ my @params = CGI::SplitParam( "foo\0bar" ) ], + [ qw/ foo bar /], + 'SplitParam' +-); ++ ); ++} + + ok( $q->MethGet,'MethGet' ); + ok( ! $q->MethPost,'MethPost' ); +@@ -60,13 +63,17 @@ $CGI::CLOSE_UPLOAD_FILES = 0; + ok( $q->close_upload_files( 1 ),'close_upload_files' ); + is( $CGI::CLOSE_UPLOAD_FILES,1,' ... sets $CGI::CLOSE_UPLOAD_FILES' ); + +-cmp_deeply( ++SKIP: { ++ skip 'Test::Deep module is not available', 1 unless ++ eval 'use Test::Deep 0.11; 1'; ++ cmp_deeply( + $q->default_dtd, + [ + '-//W3C//DTD HTML 4.01 Transitional//EN', + 'http://www.w3.org/TR/html4/loose.dtd' + ], + 'default_dtd' +-); ++ ); ++} + + ok( ! $q->private_tempfiles,'private_tempfiles' ); +diff -up CGI-4.27/t/param_list_context.t.orig CGI-4.27/t/param_list_context.t +--- CGI-4.27/t/param_list_context.t.orig 2016-03-02 08:48:20.000000000 +0100 ++++ CGI-4.27/t/param_list_context.t 2016-03-02 15:52:50.825729857 +0100 +@@ -4,7 +4,7 @@ use strict; + use warnings; + + use Test::More; +-use Test::Deep; ++ + use Test::Warn; + + use CGI (); +@@ -43,11 +43,15 @@ warnings_are + " ... but we only warn once", + ; + +-cmp_deeply( ++SKIP: { ++ skip 'Test::Deep module is not available', 1 unless ++ eval 'use Test::Deep 0.11; 1'; ++ cmp_deeply( + [ sort @params ], + [ qw/ checkers chess / ], + 'CGI::param()', +-); ++ ); ++} + + warnings_are + { @params = $q->multi_param('game') } +@@ -55,11 +59,15 @@ warnings_are + "no warnings calling multi_param" + ; + +-cmp_deeply( ++SKIP: { ++ skip 'Test::Deep module is not available', 1 unless ++ eval 'use Test::Deep 0.11; 1'; ++ cmp_deeply( + [ sort @params ], + [ qw/ checkers chess / ], + 'CGI::multi_param' +-); ++ ); ++} + + $CGI::LIST_CONTEXT_WARN = 0; + +diff -up CGI-4.27/t/request.t.orig CGI-4.27/t/request.t +--- CGI-4.27/t/request.t.orig 2016-03-02 08:16:46.000000000 +0100 ++++ CGI-4.27/t/request.t 2016-03-02 15:52:50.825729857 +0100 +@@ -4,7 +4,6 @@ use strict; + use warnings; + + use Test::More tests => 71; +-use Test::Deep; + + use CGI (); + use Config; +@@ -117,7 +116,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; 1'); + $^W++; + + CGI::_reset_globals; +diff -up CGI-4.27/t/util.t.orig CGI-4.27/t/util.t +--- CGI-4.27/t/util.t.orig 2015-12-15 18:12:19.000000000 +0100 ++++ CGI-4.27/t/util.t 2016-03-02 15:52:50.825729857 +0100 +@@ -6,7 +6,6 @@ + $| = 1; + + use Test::More tests => 80; +-use Test::Deep; + use Config; + use_ok ( 'CGI::Util', qw( + escape +@@ -68,6 +67,10 @@ for ( 1 .. 20 ) { + %args, + ); + ++ SKIP: { ++ skip 'Test::Deep module is not available', 1 unless ++ eval 'use Test::Deep 0.11; 1'; ++ + cmp_deeply( + [ @ordered ], + [ +@@ -83,6 +86,7 @@ for ( 1 .. 20 ) { + ], + 'rearrange not sensitive to hash key ordering' + ); ++ } + } + + ok( CGI::Util::utf8_chr( "1",1 ),'utf8_chr' ); diff --git a/perl-CGI.spec b/perl-CGI.spec index a792b6a..34b6e7b 100644 --- a/perl-CGI.spec +++ b/perl-CGI.spec @@ -1,12 +1,12 @@ Name: perl-CGI Summary: Handle Common Gateway Interface requests and responses Version: 4.28 -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.27-Make-Test-Deep-tests-optional.patch +Patch0: CGI-4.28-Make-Test-Deep-tests-optional.patch URL: http://search.cpan.org/dist/CGI BuildArch: noarch BuildRequires: coreutils @@ -106,6 +106,9 @@ make test %{_mandir}/man3/*.3* %changelog +* Tue Mar 15 2016 Jitka Plesnikova <jples...@redhat.com> - 4.28-2 +- Update patch which makes Test::Deep optional + * Mon Mar 14 2016 Jitka Plesnikova <jples...@redhat.com> - 4.28-1 - 4.28 bump -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-CGI.git/commit/?h=master&id=7fbac55ba3e54272ee3404bf25d4e9bfe5005248 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org