7 use Test::More 'no_plan';
10 use ExtUtils::MakeMaker;
12 ok( my $stdout = tie *STDOUT, 'TieOut' );
14 # Create a normalized MM object to test with
15 my $mm = bless {}, "MM";
17 $mm->{UNINSTALLED_PERL} = 0;
19 my $rel2abs = sub { $mm->rel2abs($mm->catfile(@_)) };
22 $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
23 $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
27 # Different architecures.
30 $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
31 $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
34 like $stdout->read, qr{\Q
35 Your perl and your Config.pm seem to have different ideas about the
36 architecture they are running on.
38 Config says: [$Config{archname}]
39 This may or may not cause problems. Please check your installation of perl
40 if you have problems building this extension.
46 # Different file path separators [rt.cpan.org 46416]
49 skip "Win32 test", 1 unless File::Spec->isa("File::Spec::Win32");
52 "/_64/perl1004/lib/Config.pm",
53 '\\_64\\perl1004\\lib\\Config.pm',
58 # PERL_SRC is set, no check is done
63 local $mm->{PERL_SRC} = 1;
65 $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
66 $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
73 # UNINSTALLED_PERL is set, no message is sent
75 local $mm->{UNINSTALLED_PERL} = 1;
77 $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
78 $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
81 like $stdout->read, qr{^Have .*\nWant .*$};