#!/usr/bin/perl
my
$TEST_MODULE
=
'Acme::Bleach'
;
plan
skip_all
=>
'build testing requires pacman & makepkg installed'
unless
( CPANPLUS::Dist::Arch::format_available );
my
$p
= Net::Ping->new();
plan
skip_all
=>
'must be connected to the interweb for these tests'
unless
(
$p
->ping(
'cpan.org'
));
$p
->
close
();
plan
tests
=> 5;
diag
"Downloading and packaging the $TEST_MODULE module"
;
my
$cb
;
ok(
$cb
= CPANPLUS::Backend->new,
q{load a CPANPLUS::Backend object}
);
my
$test_mod
;
ok(
$test_mod
=
$cb
->module_tree(
$TEST_MODULE
),
qq{load ${TEST_MODULE}
's module tree} );
ok
$test_mod
->install(
target
=>
'create'
,
format
=>
'CPANPLUS::Dist::Arch'
,
destdir
=>
'/tmp'
),
'create module package'
;
my
$pkg_fqp
=
$test_mod
->status->dist->get_pkgpath;
ok( -e
$pkg_fqp
,
'package was created'
);
ok
unlink
$pkg_fqp
;