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