Upgrade to MakeMaker 6.53_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 use strict;
6 use lib 't/lib';
7 use Test::More 'no_plan';
8
9 use ExtUtils::MakeMaker;
10
11 my @tests = (
12         # arg           # want
13     [   undef,          ['']    ],
14     [   "foo",          ['foo'] ],
15     [   [],             ['']    ],
16     [   ["foo"],        ['foo'] ],
17     [   [1, 2, 3],      [1, 2, 3] ],
18     [   [0],            [0]     ],
19     [   [''],           ['']    ],
20     [   "  ",           ['  ']  ],
21 );
22
23 for my $test (@tests) {
24     my($arg, $want) = @$test;
25
26     my $display = defined $arg ? $arg : "undef";
27     is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" );
28 }