summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/t/MM_Unix.t
blob: efd047a427b3b20d80ec53a23f45116332f6cb0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!./perl -w

# 2001-12-16 Tels first version

BEGIN {
    chdir 't' if -d 't';
    @INC = '../lib';
}

BEGIN { use Test::More; plan tests => 90; }

BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }

use strict;
use File::Spec;

my $class = 'ExtUtils::MM_Unix';

# only one of the following can be true
# test should be removed if MM_Unix ever stops handling other OS than Unix
my $os =  ($ExtUtils::MM_Unix::Is_OS2 	|| 0)
	+ ($ExtUtils::MM_Unix::Is_Mac 	|| 0)
	+ ($ExtUtils::MM_Unix::Is_Win32 || 0) 
	+ ($ExtUtils::MM_Unix::Is_Dos 	|| 0)
	+ ($ExtUtils::MM_Unix::Is_VMS   || 0); 
ok ( $os <= 1,  'There can be only one (or none)');

is ($ExtUtils::MM_Unix::VERSION, '1.12604', 'Should be that version');

# when the following calls like canonpath, catdir etc are replaced by
# File::Spec calls, the test's become a bit pointless

foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) )
  {
  is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
  }

is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'),
     'catdir(xx, xx) => xx/xx');
is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
     'catfile(xx, xx) => xx/xx');

foreach (qw/updir curdir rootdir/)
  {
  is ($class->$_(), File::Spec->$_(), $_ );
  }

foreach ( qw /
  c_o
  clean
  const_cccmd
  const_config
  const_loadlibs
  constants
  depend
  dir_target
  dist
  dist_basics
  dist_ci
  dist_core
  dist_dir
  dist_test
  dlsyms
  dynamic
  dynamic_bs
  dynamic_lib
  exescan
  export_list
  extliblist
  file_name_is_absolute
  find_perl
  fixin
  force
  guess_name
  has_link_code
  htmlifypods
  init_dirscan
  init_main
  init_others
  install
  installbin
  libscan
  linkext
  lsdir
  macro
  makeaperl
  makefile
  manifypods
  maybe_command
  maybe_command_in_dirs
  needs_linking
  nicetext
  parse_version
  pasthru
  path
  perl_archive
  perl_archive_after
  perl_script
  perldepend
  pm_to_blib
  post_constants
  post_initialize
  postamble
  ppd
  prefixify
  processPL
  quote_paren
  realclean
  replace_manpage_separator
  static
  static_lib
  staticmake
  subdir_x
  subdirs
  test
  test_via_harness
  test_via_script
  tool_autosplit
  tool_xsubpp
  tools_other
  top_targets
  writedoc
  xs_c
  xs_cpp
  xs_o
  xsubpp_version 
  / )
  {
  ok ($class->can ($_), "can $_");
  }