4.15 bump; Package examples directory as documentation

This commit is contained in:
Jitka Plesnikova 2015-04-20 15:55:43 +02:00
parent 5bfc260712
commit 485929a911
5 changed files with 160 additions and 104 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/CGI-4.04.tar.gz
/CGI-4.13.tar.gz
/CGI-4.14.tar.gz
/CGI-4.15.tar.gz

View File

@ -1,100 +0,0 @@
diff -up CGI-4.13/t/param_list_context.t.orig CGI-4.13/t/param_list_context.t
--- CGI-4.13/t/param_list_context.t.orig 2015-02-13 14:29:41.074521085 +0100
+++ CGI-4.13/t/param_list_context.t 2015-02-13 15:11:32.430400441 +0100
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::More tests => 7;
-use Test::Deep;
+
use Test::Warn;
use CGI ();
@@ -30,11 +30,15 @@ warning_like
"calling ->param with args in list context warns"
;
-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') }
@@ -42,11 +46,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.13/t/request.t.orig CGI-4.13/t/request.t
--- CGI-4.13/t/request.t.orig 2014-12-01 10:11:15.000000000 +0100
+++ CGI-4.13/t/request.t 2015-02-13 16:16:56.594560316 +0100
@@ -4,8 +4,6 @@ use strict;
use warnings;
use Test::More tests => 45;
-use Test::Deep;
-use Test::NoWarnings;
use CGI ();
use Config;
@@ -118,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' && eval 'use Test::NoWarnings; 1');
$^W++;
CGI::_reset_globals;
diff -up CGI-4.13/t/util.t.orig CGI-4.13/t/util.t
--- CGI-4.13/t/util.t.orig 2015-02-13 14:22:19.296463091 +0100
+++ CGI-4.13/t/util.t 2015-02-13 14:28:16.804556263 +0100
@@ -6,7 +6,6 @@
$| = 1;
use Test::More tests => 77;
-use Test::Deep;
use Config;
use_ok ( 'CGI::Util', qw(escape unescape rearrange) );
@@ -62,6 +61,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 ],
[
@@ -77,5 +80,6 @@ for ( 1 .. 20 ) {
],
'rearrange not sensitive to hash key ordering'
);
+ }
}

View File

@ -0,0 +1,150 @@
diff -up CGI-4.15/t/cgi.t.orig CGI-4.15/t/cgi.t
--- CGI-4.15/t/cgi.t.orig 2015-04-20 15:31:49.680912958 +0200
+++ CGI-4.15/t/cgi.t 2015-04-20 15:33:59.394460113 +0200
@@ -6,7 +6,6 @@ use strict;
use warnings;
use Test::More tests => 25;
-use Test::Deep;
use Test::Warn;
use CGI ();
@@ -28,11 +27,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' );
@@ -61,13 +64,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.15/t/param_list_context.t.orig CGI-4.15/t/param_list_context.t
--- CGI-4.15/t/param_list_context.t.orig 2015-04-16 11:07:47.000000000 +0200
+++ CGI-4.15/t/param_list_context.t 2015-04-20 14:55:08.907630027 +0200
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::More tests => 7;
-use Test::Deep;
+
use Test::Warn;
use CGI ();
@@ -30,11 +30,15 @@ warning_like
"calling ->param with args in list context warns"
;
-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') }
@@ -42,11 +46,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.15/t/request.t.orig CGI-4.15/t/request.t
--- CGI-4.15/t/request.t.orig 2015-04-16 11:07:47.000000000 +0200
+++ CGI-4.15/t/request.t 2015-04-20 14:55:08.907630027 +0200
@@ -4,8 +4,6 @@ use strict;
use warnings;
use Test::More tests => 45;
-use Test::Deep;
-use Test::NoWarnings;
use CGI ();
use Config;
@@ -118,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' && eval 'use Test::NoWarnings; 1');
$^W++;
CGI::_reset_globals;
diff -up CGI-4.15/t/util.t.orig CGI-4.15/t/util.t
--- CGI-4.15/t/util.t.orig 2015-04-17 15:22:23.000000000 +0200
+++ CGI-4.15/t/util.t 2015-04-20 14:55:08.908630038 +0200
@@ -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' );

View File

@ -1,12 +1,12 @@
Name: perl-CGI
Summary: Handle Common Gateway Interface requests and responses
Version: 4.14
Version: 4.15
Release: 1%{?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 and Test::NoWarnings tests optional as it's not in the core in contrast to the CGI
Patch0: CGI-4.13-Make-Test-Deep-and-Test-NoWarnings-tests-optional.patch
Patch0: CGI-4.15-Make-Test-Deep-and-Test-NoWarnings-tests-optional.patch
URL: http://search.cpan.org/dist/CGI
BuildArch: noarch
BuildRequires: perl
@ -81,6 +81,7 @@ with built-in support for mod_perl and mod_perl2 as well as FastCGI.
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
chmod -c -x examples/*
%build
perl Makefile.PL INSTALLDIRS=vendor
@ -95,11 +96,15 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
make test
%files
%doc Changes README.md
%doc Changes README.md examples/
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*
%changelog
* Mon Apr 20 2015 Jitka Plesnikova <jplesnik@redhat.com> - 4.15-1
- 4.15 bump
- Package examples directory as documentation
* Wed Apr 01 2015 Petr Pisar <ppisar@redhat.com> - 4.14-1
- 4.14 bump

View File

@ -1 +1 @@
00bc90adde53684fd646d6079a78c101 CGI-4.14.tar.gz
e6a8b8f2495c397550d36f5d1d9255e5 CGI-4.15.tar.gz