4 if( $ENV{PERL_CORE} ) {
6 unshift @INC, '../lib';
7 require Config; import Config;
8 if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
9 print "1..0 # Skip: Data::Dumper was not built\n";
14 unshift @INC, 't/lib';
20 use Test::More tests => 6;
24 use_ok( 'ExtUtils::Liblist' );
27 ok( defined &ExtUtils::Liblist::ext,
28 'ExtUtils::Liblist::ext() defined for backwards compat' );
32 local $SIG{__WARN__} = sub {push @warn, [@_]};
34 my $ll = bless {}, 'ExtUtils::Liblist';
35 my @out = $ll->ext('-ln0tt43r3_perl');
36 is( @out, 4, 'enough output' );
37 unlike( $out[2], qr/-ln0tt43r3_perl/, 'bogus library not added' );
38 ok( @warn, 'had warning');
40 is( grep(/\QNote (probably harmless): No library found for \E(-l)?n0tt43r3_perl/, map { @$_ } @warn), 1 ) || diag Dumper @warn;