3 # 2001-12-16 Tels first version
10 BEGIN { use Test::More; plan tests => 90; }
12 BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
17 my $class = 'ExtUtils::MM_Unix';
19 # only one of the following can be true
20 # test should be removed if MM_Unix ever stops handling other OS than Unix
21 my $os = ($ExtUtils::MM_Unix::Is_OS2 || 0)
22 + ($ExtUtils::MM_Unix::Is_Mac || 0)
23 + ($ExtUtils::MM_Unix::Is_Win32 || 0)
24 + ($ExtUtils::MM_Unix::Is_Dos || 0)
25 + ($ExtUtils::MM_Unix::Is_VMS || 0);
26 ok ( $os <= 1, 'There can be only one (or none)');
28 is ($ExtUtils::MM_Unix::VERSION, '1.12604', 'Should be that version');
30 # when the following calls like canonpath, catdir etc are replaced by
31 # File::Spec calls, the test's become a bit pointless
33 foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) )
35 is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
38 is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'),
39 'catdir(xx, xx) => xx/xx');
40 is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
41 'catfile(xx, xx) => xx/xx');
43 foreach (qw/updir curdir rootdir/)
45 is ($class->$_(), File::Spec->$_(), $_ );
109 replace_manpage_separator
129 ok ($class->can ($_), "can $_");