summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/t/hints.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExtUtils/t/hints.t')
-rw-r--r--lib/ExtUtils/t/hints.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ExtUtils/t/hints.t b/lib/ExtUtils/t/hints.t
index 62608d7bbb..b74690fe0a 100644
--- a/lib/ExtUtils/t/hints.t
+++ b/lib/ExtUtils/t/hints.t
@@ -11,10 +11,16 @@ BEGIN {
}
chdir 't';
+use File::Spec;
+
use Test::More tests => 3;
+# Having the CWD in @INC masked a bug in finding hint files
+my $curdir = File::Spec->curdir;
+@INC = grep { $_ ne $curdir && $_ ne '.' } @INC;
+
mkdir('hints', 0777);
-my $hint_file = "hints/$^O.pl";
+my $hint_file = File::Spec->catfile('hints', "$^O.pl");
open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
print HINT <<'CLOO';
$self->{CCFLAGS} = 'basset hounds got long ears';