82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / 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';
d00e3d8a 7}
8
c0956255 9use strict;
d00e3d8a 10use lib './lib';
c0956255 11use Test::More 'no_plan';
12
13use ExtUtils::MakeMaker;
14
15my @tests = (
16 # arg # want
17 [ undef, [''] ],
18 [ "foo", ['foo'] ],
19 [ [], [''] ],
20 [ ["foo"], ['foo'] ],
21 [ [1, 2, 3], [1, 2, 3] ],
22 [ [0], [0] ],
23 [ [''], [''] ],
24 [ " ", [' '] ],
25);
26
27for my $test (@tests) {
28 my($arg, $want) = @$test;
29
30 my $display = defined $arg ? $arg : "undef";
31 is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" );
32}