ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / fix_libs.t
CommitLineData
c0956255 1#!/usr/bin/perl -w
2
3# Unit test the code which fixes up $self->{LIBS}
4
d00e3d8a 5BEGIN {
6 chdir 't' if -d 't';
7
8 if( $ENV{PERL_CORE} ) {
9 @INC = '../lib';
10 }
11}
12
c0956255 13use strict;
d00e3d8a 14use lib './lib';
c0956255 15use Test::More 'no_plan';
16
17use ExtUtils::MakeMaker;
18
19my @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
31for 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}