Skip to content

Commit

Permalink
resolve #17 - remove use of Test::Deep completely
Browse files Browse the repository at this point in the history
w/r/t/ 0cb4e6c there is still one test
using Test::Deep, but we can replace it as the usage is trivial and this
removes the issue with Test::Deep not being correctly listed as a prereq
  • Loading branch information
leejo committed Nov 17, 2017
1 parent bf69660 commit d6d74d8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -20,11 +20,10 @@ before_install:

install:
- export RELEASE_TESTING=1 AUTOMATED_TESTING=1 AUTHOR_TESTING=1 HARNESS_OPTIONS=j1:c HARNESS_TIMER=1
- cpanm --quiet --notest Devel::Cover::Report::Coveralls
- cpanm --quiet --notest --installdeps .

script:
- PERL5OPT=-MDevel::Cover=-ignore,"t/",+ignore,"prove",-coverage,statement,branch,condition,path,subroutine prove -lrs t
- prove -lrs t
- cover

after_success:
Expand Down
4 changes: 4 additions & 0 deletions Changes
@@ -1,5 +1,9 @@
Revision history for CGI::Fast

2.13 2017-11-17
[TESTING]
remove use of Test::Deep completely (GH #17)

2.12 2016-11-22
[DOCUMENTATION]
- tweak docs about overriding STDIN due to interference with POST
Expand Down
1 change: 0 additions & 1 deletion Makefile.PL
Expand Up @@ -18,7 +18,6 @@ WriteMakefile(
},
TEST_REQUIRES => {
'Test::More' => 0,
'Test::Deep' => 0.11,
'File::Temp' => 0,
},
test => { TESTS => 't/*.t' },
Expand Down
2 changes: 1 addition & 1 deletion lib/CGI/Fast.pm
Expand Up @@ -3,7 +3,7 @@ use strict;
use warnings;
use if $] >= 5.019, 'deprecate';

$CGI::Fast::VERSION='2.12';
$CGI::Fast::VERSION='2.13';

use CGI;
use CGI::Carp;
Expand Down
29 changes: 7 additions & 22 deletions t/003_env_pollution.t
Expand Up @@ -3,8 +3,7 @@
use strict;
use warnings;

use Test::More tests => 5;
use Test::Deep;
use Test::More tests => 18;

use CGI::Fast socket_path => ":7070";

Expand Down Expand Up @@ -42,26 +41,12 @@ foreach my $i ( 1 .. 5 ) {
};

if ( $i % 2 == 0 ) {
cmp_deeply(
$cgi_vars,
{
remote_addr => ignore(),
raw_cookie => '',
path_info => '',
query_string => '',
},
'ENV variables not reused from last request'
);
is( $cgi_vars->{$_},'','ENV variables not reused from last request' )
for qw/ raw_cookie path_info query_string /;
} else {
cmp_deeply(
$cgi_vars,
{
remote_addr => 'REMOTE_ADDR',
raw_cookie => 'HTTP_COOKIE',
path_info => 'PATH_INFO',
query_string => '',
},
'ENV variables set from current environment'
);
is( $cgi_vars->{remote_addr},'REMOTE_ADDR','ENV variables set from current environment' );
is( $cgi_vars->{raw_cookie},'HTTP_COOKIE','ENV variables set from current environment' );
is( $cgi_vars->{path_info},'PATH_INFO','ENV variables set from current environment' );
is( $cgi_vars->{query_string},'','ENV variables set from current environment' );
}
}

0 comments on commit d6d74d8

Please sign in to comment.