summaryrefslogtreecommitdiff
path: root/t/porting/cmp_version.t
diff options
context:
space:
mode:
Diffstat (limited to 't/porting/cmp_version.t')
-rw-r--r--t/porting/cmp_version.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/porting/cmp_version.t b/t/porting/cmp_version.t
index 7384416658..81cbf2c704 100644
--- a/t/porting/cmp_version.t
+++ b/t/porting/cmp_version.t
@@ -5,10 +5,12 @@
# Adapted from Porting/cmpVERSION.pl by Abigail
# Changes folded back into that by Nicholas
+BEGIN {
+ @INC = '..' if -f '../TestInit.pm';
+}
+use TestInit 'T'; # T is chdir to the top level
use strict;
-chdir '..' unless -d 't';
-
if (! -d '.git' ) {
print "1..0 # SKIP: not being run from a git checkout\n";
exit 0;
@@ -16,4 +18,4 @@ if (! -d '.git' ) {
my $dotslash = $^O eq "MSWin32" ? ".\\" : "./";
-system "${dotslash}perl -Ilib Porting/cmpVERSION.pl --exclude --tap";
+system "${dotslash}perl Porting/cmpVERSION.pl --exclude --tap";