Commit | Line | Data |
c0956255 |
1 | #!/usr/bin/perl -w |
2 | |
3 | # Unit test the code which fixes up $self->{LIBS} |
4 | |
d00e3d8a |
5 | BEGIN { |
6 | chdir 't' if -d 't'; |
d00e3d8a |
7 | } |
8 | |
c0956255 |
9 | use strict; |
d00e3d8a |
10 | use lib './lib'; |
c0956255 |
11 | use Test::More 'no_plan'; |
12 | |
13 | use ExtUtils::MakeMaker; |
14 | |
15 | my @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 | |
27 | for 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 | } |