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 lib './lib'; 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} 33