Alien-Build
view release on metacpan or search on metacpan
t/alien_build_plugin_build_cmake.t view on Meta::CPAN
if(! defined $alien)
{
if($^O eq 'MSWin32')
{
my $tmp = $build->root;
$tmp =~ s{/}{\\}g;
$tmp .= "\\..";
diag "dir $tmp /s";
diag `dir $tmp /s`;
}
else
{
my $tmp = Path::Tiny->new($build->root)->parent;
diag `ls -lR $tmp`;
}
}
alien_ok $alien;
note 'cflags = ', $alien->cflags;
note 'libs = ', $alien->libs;
xs_ok { xs => $xs, verbose => 1 }, with_subtest {
my($mod) = @_;
is($mod->is_palindrome("Something that is not a palindrome"), 0);
is($mod->is_palindrome("Was it a car or a cat I saw?"), 1);
};
run_ok(['palx', 'Something that is not a palindrome'])
->note
->exit_is(2);
run_ok(['palx', 'Was it a car or a cat I saw?'])
->note
->success;
run_ok(['palx', 'racecar'])
->note
->success;
};
};
done_testing
__DATA__
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <libpalindrome.h>
MODULE = TA_MODULE PACKAGE = TA_MODULE
int
is_palindrome(klass, word)
const char *klass
const char *word
CODE:
RETVAL = is_palindrome(word);
OUTPUT:
RETVAL
( run in 0.885 second using v1.01-cache-2.11-cpan-13bb782fe5a )