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