assorted VMS test fix-ups, $Config{prefixexp} revisited
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / hints.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4     if( $ENV{PERL_CORE} ) {
5         chdir 't';
6         @INC = ('../lib', 'lib/');
7     }
8     else {
9         unshift @INC, 't/lib/';
10     }
11 }
12 chdir 't';
13
14 use Test::More tests => 2;
15
16 mkdir 'hints';
17 my $hint_file = "hints/$^O.pl";
18 open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
19 print HINT <<'CLOO';
20 $self->{CCFLAGS} = 'basset hounds got long ears';
21 CLOO
22 close HINT;
23
24 use TieOut;
25 use ExtUtils::MakeMaker;
26
27 my $out = tie *STDERR, 'TieOut';
28 my $mm = bless {}, 'ExtUtils::MakeMaker';
29 $mm->check_hints;
30 is( $mm->{CCFLAGS}, 'basset hounds got long ears' );
31 is( $out->read, "Processing hints file $hint_file\n" );
32
33 package Catch;
34
35
36 END {
37     use File::Path;
38     rmtree ['hints'];
39 }