Skip to content

Commit

Permalink
Fix t/script.t on CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 28, 2024
1 parent 1ba7642 commit afbe3e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ WriteMakefile(
'URI::Heuristic' => 0,
# 'Sub::Private' => 0,
'Sys::Hostname' => 0,
'File::Spec' => 0,
'File::Spec' => 3.4,
'File::HomeDir' => 0,
'Cwd' => 0,
'Socket' => 0,
'List::MoreUtils' => 0,
Expand Down
5 changes: 4 additions & 1 deletion t/script.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use strict;
use warnings;
use Test::Most tests => 64;
use File::Spec;
use File::HomeDir;
use Cwd;
use Test::NoWarnings;
use Tie::Filehandle::Preempt::Stdin;
Expand Down Expand Up @@ -193,14 +194,16 @@ PATHS: {
delete $ENV{'DOCUMENT_ROOT'};
$i = new_ok('CGI::Info');
ok($i->script_name() eq 'bar.pl');
my $home = File::HomeDir->my_home();
if($^O eq 'MSWin32') {
TODO: {
local $TODO = 'Script_dir test needs to be done on Windows';
like($i->script_dir(), qr/\/CGI-Info/i, 'Check script_dir looks right');
ok($i->script_path() =~ /\\.+bar\.pl$/);
}
} else {
like($i->script_dir(), qr/\/CGI-Info/i, 'Check script_dir looks right');
# like($i->script_dir(), qr/\/CGI-Info/i, 'Check script_dir looks right');
like($i->script_dir(), qr/$home/, 'Check script_dir looks right');
ok($i->script_path() =~ /\/.+bar\.pl$/);
}

Expand Down

0 comments on commit afbe3e1

Please sign in to comment.