diff options
Diffstat (limited to 'lib/ExtUtils/t/fix_libs.t')
-rw-r--r-- | lib/ExtUtils/t/fix_libs.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/ExtUtils/t/fix_libs.t b/lib/ExtUtils/t/fix_libs.t new file mode 100644 index 0000000000..c683fc5571 --- /dev/null +++ b/lib/ExtUtils/t/fix_libs.t @@ -0,0 +1,28 @@ +#!/usr/bin/perl -w + +# Unit test the code which fixes up $self->{LIBS} + +use strict; +use lib 't/lib'; +use Test::More 'no_plan'; + +use ExtUtils::MakeMaker; + +my @tests = ( + # arg # want + [ undef, [''] ], + [ "foo", ['foo'] ], + [ [], [''] ], + [ ["foo"], ['foo'] ], + [ [1, 2, 3], [1, 2, 3] ], + [ [0], [0] ], + [ [''], [''] ], + [ " ", [' '] ], +); + +for my $test (@tests) { + my($arg, $want) = @$test; + + my $display = defined $arg ? $arg : "undef"; + is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" ); +} |