From: Peter Rabbitson Date: Sun, 10 Apr 2016 00:26:08 +0000 (+0200) Subject: Make sure t/10-pure-perl.t runs are identical regardless of invocation X-Git-Tag: 0.27~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Fnamespace-clean.git;a=commitdiff_plain;h=03073cbe7cf94068a5ee4cebec2472d7cb137169 Make sure t/10-pure-perl.t runs are identical regardless of invocation Previously `prove -lr ./t` would trip things up --- diff --git a/t/10-pure-perl.t b/t/10-pure-perl.t index 2426afb..54dec9f 100644 --- a/t/10-pure-perl.t +++ b/t/10-pure-perl.t @@ -41,6 +41,7 @@ ok( use Config; use IPC::Open2 qw(open2); use File::Glob 'bsd_glob'; +use Cwd 'abs_path'; # for the $^X-es $ENV{PERL5LIB} = join ($Config{path_sep}, @INC); @@ -48,10 +49,11 @@ $ENV{PATH} = ''; # rerun the tests under the assumption of pure-perl -my $this_file = quotemeta(__FILE__); +my $this_file = abs_path(__FILE__); for my $fn ( bsd_glob("t/*.t") ) { - next if $fn =~ /${this_file}$/; + + next if abs_path($fn) eq $this_file; my @cmd = map { $_ =~ /(.+)/ } ($^X, $fn);