(Undone by #13766.)
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / MM_Unix.t
1 #!./perl -w
2
3 # 2001-12-16 Tels first version
4
5 BEGIN {
6     chdir 't' if -d 't';
7     @INC = '../lib';
8 }
9
10 BEGIN { use Test::More; plan tests => 90; }
11
12 BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
13
14 use strict;
15 use File::Spec;
16
17 my $class = 'ExtUtils::MM_Unix';
18
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)');
27
28 is ($ExtUtils::MM_Unix::VERSION, '1.12604', 'Should be that version');
29
30 # when the following calls like canonpath, catdir etc are replaced by
31 # File::Spec calls, the test's become a bit pointless
32
33 foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) )
34   {
35   is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
36   }
37
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');
42
43 foreach (qw/updir curdir rootdir/)
44   {
45   is ($class->$_(), File::Spec->$_(), $_ );
46   }
47
48 foreach ( qw /
49   c_o
50   clean
51   const_cccmd
52   const_config
53   const_loadlibs
54   constants
55   depend
56   dir_target
57   dist
58   dist_basics
59   dist_ci
60   dist_core
61   dist_dir
62   dist_test
63   dlsyms
64   dynamic
65   dynamic_bs
66   dynamic_lib
67   exescan
68   export_list
69   extliblist
70   file_name_is_absolute
71   find_perl
72   fixin
73   force
74   guess_name
75   has_link_code
76   htmlifypods
77   init_dirscan
78   init_main
79   init_others
80   install
81   installbin
82   libscan
83   linkext
84   lsdir
85   macro
86   makeaperl
87   makefile
88   manifypods
89   maybe_command
90   maybe_command_in_dirs
91   needs_linking
92   nicetext
93   parse_version
94   pasthru
95   path
96   perl_archive
97   perl_archive_after
98   perl_script
99   perldepend
100   pm_to_blib
101   post_constants
102   post_initialize
103   postamble
104   ppd
105   prefixify
106   processPL
107   quote_paren
108   realclean
109   replace_manpage_separator
110   static
111   static_lib
112   staticmake
113   subdir_x
114   subdirs
115   test
116   test_via_harness
117   test_via_script
118   tool_autosplit
119   tool_xsubpp
120   tools_other
121   top_targets
122   writedoc
123   xs_c
124   xs_cpp
125   xs_o
126   xsubpp_version 
127   / )
128   {
129   ok ($class->can ($_), "can $_");
130   }
131
132