Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (26 sloc) 0.73 kb
use strict;
use warnings;
use Test::More;
use_ok('Alien::Base::ModuleBuild');
my $skip;
system( 'pkg-config --version' );
if ( $? ) {
$skip = "Cannot use pkg-config: $?";
}
SKIP: {
skip $skip, 2 if $skip;
my @installed = map { /^(\S+)/ ? $1 : () } `pkg-config --list-all`;
my $lib = $installed[0];
my ($builder_ok, $builder_bad) = map {
Alien::Base::ModuleBuild->new(
module_name => 'My::Test',
dist_version => 0.01,
alien_name => $_,
share_dir => 't',
);
}
($lib, 'siughspidghsp');
is( !! $builder_ok->alien_check_installed_version, 1, "Found installed library $lib" );
is( $builder_bad->alien_check_installed_version, 0, 'Returns 0 if not found' );
}
done_testing;
Jump to Line
Something went wrong with that request. Please try again.