AI-Ollama-Client
view release on metacpan or search on metacpan
xt/99-compile.t view on Meta::CPAN
require './Makefile.PL';
# Loaded from Makefile.PL
our %module = get_module_info();
my $last_version = undef;
sub check {
#return if (! m{(\.pm|\.pl) \z}xmsi);
my ($stdout, $stderr, $exit) = capture(sub {
system( $^X, '-Mblib', '-c', $_ );
});
s!\s*\z!!
for ($stdout, $stderr);
if( $exit ) {
diag $stderr;
diag "Exit code: ", $exit;
fail($_);
} elsif( $stderr ne "$_ syntax OK") {
diag $stderr;
fail($_);
} else {
pass($_);
};
}
my @files;
find({wanted => \&wanted, no_chdir => 1},
grep { -d $_ }
'blib/lib', 'examples', 'lib'
xt/99-test-prerequisites.t view on Meta::CPAN
# If we have no apparent missing prerequisites, we're good
my @missing = sort keys %missing;
# Rerun the test without these modules and see whether it crashes
my @failed;
for my $candidate (@missing) {
diag "Checking that $candidate is not essential";
my @cmd = ($^X, "-MTest::Without::Module=$candidate", "-Mblib", '-w', $test_file);
my $cmd = join " ", @cmd;
my ($stdout, $stderr, $exit) = capture {
system( @cmd );
};
if( $exit != 0 ) {
push @failed, [ $candidate, [@cmd]];
} elsif( $? != 0 ) {
push @failed, [ $candidate, [@cmd]];
};
};
is 0+@failed, 0, $test_file
or diag Dumper \@failed;
( run in 1.172 second using v1.01-cache-2.11-cpan-49f99fa48dc )