ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / fix_libs.t
1 #!/usr/bin/perl -w
2
3 # Unit test the code which fixes up $self->{LIBS}
4
5 BEGIN {
6     chdir 't' if -d 't';
7
8     if( $ENV{PERL_CORE} ) {
9         @INC = '../lib';
10     }
11 }
12
13 use strict;
14 use lib './lib';
15 use Test::More 'no_plan';
16
17 use ExtUtils::MakeMaker;
18
19 my @tests = (
20         # arg           # want
21     [   undef,          ['']    ],
22     [   "foo",          ['foo'] ],
23     [   [],             ['']    ],
24     [   ["foo"],        ['foo'] ],
25     [   [1, 2, 3],      [1, 2, 3] ],
26     [   [0],            [0]     ],
27     [   [''],           ['']    ],
28     [   "  ",           ['  ']  ],
29 );
30
31 for my $test (@tests) {
32     my($arg, $want) = @$test;
33
34     my $display = defined $arg ? $arg : "undef";
35     is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" );
36 }