BEGIN {
@INC = '..' if -f '../TestInit.pm';
}
-use TestInit 'T'; # T is chdir to the top level
+use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
use strict;
require 't/test.pl';
find_git_or_skip('all');
-my $dotslash = $^O eq "MSWin32" ? ".\\" : "./";
-system("git log --pretty=fuller | ${dotslash}perl Porting/checkAUTHORS.pl --tap -");
+system("git log --pretty=fuller | $^X Porting/checkAUTHORS.pl --tap -");
# EOF
BEGIN {
@INC = '..' if -f '../TestInit.pm';
}
-use TestInit 'T'; # T is chdir to the top level
+use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
use strict;
require 't/test.pl';
find_git_or_skip('all');
-my $dotslash = $^O eq "MSWin32" ? ".\\" : "./";
-
-system "${dotslash}perl Porting/cmpVERSION.pl --exclude --tap";
+system "$^X Porting/cmpVERSION.pl --exclude --tap";
BEGIN {
@INC = '..' if -f '../TestInit.pm';
}
-use TestInit 'T'; # T is chdir to the top level
+use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
require 't/test.pl';
sub find_git_or_skip {
return if -d '.git';
+ if (-l 'MANIFEST' && -l 'AUTHORS') {
+ my $where = readlink 'MANIFEST';
+ die "Can't readling MANIFEST: $!" unless defined $where;
+ die "Confusing symlink target for MANIFEST, '$where'"
+ unless $where =~ s!/MANIFEST\z!!;
+ if (-d "$where/.git") {
+ # Looks like we are in a symlink tree
+ chdir $where or die "Can't chdir '$where': $!";
+ note("Found source tree at $where");
+ return;
+ }
+ }
my $reason = 'not being run from a git checkout';
skip_all($reason) if $_[0] && $_[0] eq 'all';
skip($reason, @_);