3 # 2001-12-16 Tels first version
13 if( $^O =~ /^VMS|os2|MacOS|MSWin32|cygwin$/ ) {
14 plan skip_all => 'Non-Unix platform';
21 BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
26 my $class = 'ExtUtils::MM_Unix';
28 # only one of the following can be true
29 # test should be removed if MM_Unix ever stops handling other OS than Unix
30 my $os = ($ExtUtils::MM_Unix::Is_OS2 || 0)
31 + ($ExtUtils::MM_Unix::Is_Mac || 0)
32 + ($ExtUtils::MM_Unix::Is_Win32 || 0)
33 + ($ExtUtils::MM_Unix::Is_Dos || 0)
34 + ($ExtUtils::MM_Unix::Is_VMS || 0);
35 ok ( $os <= 1, 'There can be only one (or none)');
37 is ($ExtUtils::MM_Unix::VERSION, '1.12604', 'Should be that version');
39 # when the following calls like canonpath, catdir etc are replaced by
40 # File::Spec calls, the test's become a bit pointless
42 foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) )
44 is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
47 is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'),
48 'catdir(xx, xx) => xx/xx');
49 is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
50 'catfile(xx, xx) => xx/xx');
52 foreach (qw/updir curdir rootdir/)
54 is ($class->$_(), File::Spec->$_(), $_ );
118 replace_manpage_separator
138 ok ($class->can ($_), "can $_");