4 if( $ENV{PERL_CORE} ) {
6 unshift @INC, '../lib';
15 use Test::More tests => 6;
19 use_ok( 'ExtUtils::Liblist' );
22 ok( defined &ExtUtils::Liblist::ext,
23 'ExtUtils::Liblist::ext() defined for backwards compat' );
27 local $SIG{__WARN__} = sub {push @warn, [@_]};
29 my $ll = bless {}, 'ExtUtils::Liblist';
30 my @out = $ll->ext('-ln0tt43r3_perl');
31 is( @out, 4, 'enough output' );
32 unlike( $out[2], qr/-ln0tt43r3_perl/, 'bogus library not added' );
33 ok( @warn, 'had warning');
35 is( grep(/\QNote (probably harmless): No library found for \E(-l)?n0tt43r3_perl/, map { @$_ } @warn), 1 ) || diag Dumper @warn;