MM_Unix.pm : work around File::Find problem on VMS
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / prefixify.t
CommitLineData
e0678a30 1#!/usr/bin/perl -w
2
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 chdir 't' if -d 't';
6 @INC = ('../lib', 'lib');
7 }
8 else {
9 unshift @INC, 't/lib';
10 }
11}
12
13use strict;
45bc4d3a 14use Test::More;
15
16if( $^O eq 'VMS' ) {
17 plan skip_all => 'prefixify works differently on VMS';
18}
19else {
20 plan tests => 2;
21}
e0678a30 22use File::Spec;
23use ExtUtils::MM;
24
25my $mm = bless {}, 'MM';
26
27my $default = File::Spec->catdir(qw(this that));
28$mm->prefixify('installbin', 'wibble', 'something', $default);
5c161494 29
e0678a30 30is( $mm->{INSTALLBIN}, File::Spec->catdir('something', $default),
31 'prefixify w/defaults');
45bc4d3a 32
33{
34 undef *ExtUtils::MM_Unix::Config;
35 $ExtUtils::MM_Unix::Config{wibble} = 'C:\opt\perl\wibble';
36 $mm->prefixify('wibble', 'C:\opt\perl', 'C:\yarrow');
37
38 is( $mm->{WIBBLE}, 'C:\yarrow\wibble', 'prefixify Win32 paths' );
39 { package ExtUtils::MM_Unix; Config->import }
40}