Alien-Pluto
view release on metacpan or search on metacpan
use alienfile;
#our $VERSION = 0.005_000;
plugin 'Probe::CBuilder' => (
# DEV NOTE: can not mix 'aliens' and 'cflags' or 'libs' options below;
# Alien::Texinfo provides a command-line utility `makeinfo`, not source and/or library files to be used during compilation
# aliens => [ 'Alien::Texinfo' ], # incorrect
program => "#include <libpluto.h>\nint main() { return 0; }\n",
lang => 'C++', # mostly C, but some C++, according to GitHub
# paths for pre-existing AKA system install
# NEED FIXES: remove hard-coded paths below; add Windows-compatible paths
cflags => '-I/usr/local/include/pluto/ -std=c++11',
libs => '-L/usr/local/lib/',
);
share {
# DEV NOTE, CORRELATION #ap020: must update Alien::Texinfo & Alien::bison & Alien::flex versions in BOTH alienfile & Makefile.PL
requires 'Alien::Texinfo' => '0.005';
requires 'Alien::bison' => '0.19';
requires 'Alien::flex' => '0.12';
plugin Download => (
t/04_binary_version_test2.t view on Meta::CPAN
use Test::Alien;
use Alien::Pluto;
use English qw(-no_match_vars); # for $OSNAME
use Data::Dumper; # DEBUG
plan(8);
# load alien
alien_ok('Alien::Pluto', 'Alien::Pluto loads successfully and conforms to Alien::Base specifications');
# test version flag
my $run_object = run_ok([ 'pluto', '--version' ], 'Command `pluto --version` runs');
#print {*STDERR} "\n", q{<<< DEBUG >>> in t/04_binary_version_test2.t, have $run_object->out() = }, Dumper($run_object->out()), "\n";
#print {*STDERR} "\n", q{<<< DEBUG >>> in t/04_binary_version_test2.t, have $run_object->err() = }, Dumper($run_object->err()), "\n";
#$run_object->success('Command `pluto --version` runs successfully'); # DEV NOTE: does not work, pluto has weird exit values
$run_object->exit_is(3, 'Command `pluto --version` runs successfully');
# EXAMPLE: PLUTO 0.11.4 - An automatic parallelizer and locality optimizer
is((substr $run_object->out(), 0, 6), 'PLUTO ', 'Command `pluto --version` output starts correctly');
# DEV NOTE: can't use out_like() on the next line because it does not properly capture to $1, as used in the following split
ok($run_object->out() =~ m/^PLUTO\ ([0-9\.]+)\ -\ An\ automatic\ parallelizer\ and\ locality\ optimizer$/xms, 'Command `pluto --version` runs with valid output');
( run in 0.238 second using v1.01-cache-2.11-cpan-94b05bcf43c )