1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
my $t; use lib ($t = -e 't' ? 't' : 'test'), 'inc';
use TestModuleCompile tests => 4;
use Capture::Tiny qw(capture);
use App::Prove;
no_diff;
my $pmc;
BEGIN {
$pmc = "$t/lib/DataTest.pmc";
unlink($pmc);
ok((not -e $pmc), ".pmc doesn't exist yet");
}
use DataTest;
ok((-e $pmc), ".pmc exists");
{
local $/;
my $data = <DataTest::DATA>;
is $data, "\none\ntwo\n\nthree\n\n",
"DATA section is correct";
}
my ($out, $err, $exit) = capture {
my $app = App::Prove->new;
$app->process_args(qw(-l), "$t/data2.t.subrun");
$app->run ? 0 : 1;
};
is $exit, 0, '.pmc load works same'
or diag 'Output was: ', $out, 'Error was: ', $err;
|