This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
MM check_hints test
authorMichael G. Schwern <schwern@pobox.com>
Thu, 17 Jan 2002 20:25:57 +0000 (15:25 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 18 Jan 2002 00:35:24 +0000 (00:35 +0000)
Message-ID: <20020118012557.GE32762@blackrider>

p4raw-id: //depot/perl@14323

MANIFEST
lib/ExtUtils/t/hints.t [new file with mode: 0644]

index 605acf0..1f7078d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -964,6 +964,7 @@ lib/ExtUtils/t/MM_Unix.t    See if ExtUtils::MM_UNIX works
 lib/ExtUtils/t/MM_VMS.t                See if ExtUtils::MM_VMS works
 lib/ExtUtils/t/MM_Win32.t      See if ExtUtils::MM_Win32 works
 lib/ExtUtils/t/Packlist.t      See if Packlist works
 lib/ExtUtils/t/MM_VMS.t                See if ExtUtils::MM_VMS works
 lib/ExtUtils/t/MM_Win32.t      See if ExtUtils::MM_Win32 works
 lib/ExtUtils/t/Packlist.t      See if Packlist works
+lib/ExtUtils/t/hints.t      See if hint files are honored.
 lib/ExtUtils/t/testlib.t       Fixes up @INC to use just-built extension
 lib/ExtUtils/testlib.pm                Fixes up @INC to use just-built extension
 lib/ExtUtils/typemap           Extension interface types
 lib/ExtUtils/t/testlib.t       Fixes up @INC to use just-built extension
 lib/ExtUtils/testlib.pm                Fixes up @INC to use just-built extension
 lib/ExtUtils/typemap           Extension interface types
diff --git a/lib/ExtUtils/t/hints.t b/lib/ExtUtils/t/hints.t
new file mode 100644 (file)
index 0000000..7038de9
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+BEGIN {
+    if( $ENV{PERL_CORE} ) {
+        chdir 't';
+        @INC = '../lib';
+    }
+}
+chdir 't';
+
+use Test::More tests => 1;
+
+mkdir 'hints';
+my $hint = $^O;
+open(HINT, ">hints/$hint.pl") || die "Can't write dummy hints file: $!";
+print HINT <<'CLOO';
+$self->{CCFLAGS} = 'basset hounds got long ears';
+CLOO
+close HINT;
+
+use ExtUtils::MakeMaker;
+my $mm = bless {}, 'ExtUtils::MakeMaker';
+$mm->check_hints;
+is( $mm->{CCFLAGS}, 'basset hounds got long ears' );
+
+
+END {
+    use File::Path;
+    rmtree ['hints'];
+}