Change 14323 by jhi@alpha on 2002/01/18 00:35:24

        Subject: [PATCH] MM check_hints test
        From: Michael G Schwern <[EMAIL PROTECTED]>
        Date: Thu, 17 Jan 2002 20:25:57 -0500
        Message-ID: <20020118012557.GE32762@blackrider>

Affected files ...

.... //depot/perl/MANIFEST#715 edit
.... //depot/perl/lib/ExtUtils/t/hints.t#1 add

Differences ...

==== //depot/perl/MANIFEST#715 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST.~1~   Thu Jan 17 17:45:05 2002
+++ perl/MANIFEST       Thu Jan 17 17:45:05 2002
@@ -964,6 +964,7 @@
 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

==== //depot/perl/lib/ExtUtils/t/hints.t#1 (text) ====
Index: perl/lib/ExtUtils/t/hints.t
--- perl/lib/ExtUtils/t/hints.t.~1~     Thu Jan 17 17:45:05 2002
+++ perl/lib/ExtUtils/t/hints.t Thu Jan 17 17:45:05 2002
@@ -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'];
+}
End of Patch.

Reply via email to