| 1 |
use Test2::V0; |
| 2 |
|
| 3 |
use File::Temp qw/tempdir/; |
| 4 |
use File::Spec; |
| 5 |
|
| 6 |
use Test2::Harness::Util::File::JSONL; |
| 7 |
use App::Yath::Tester qw/yath/; |
| 8 |
|
| 9 |
my $dir = __FILE__; |
| 10 |
$dir =~ s{\.t$}{}g; |
| 11 |
$dir =~ s{^\./}{}; |
| 12 |
|
| 13 |
my $out = yath( |
| 14 |
command => 'test', |
| 15 |
args => [$dir, '--ext=tx'], |
| 16 |
log => 1, |
| 17 |
exit => 0, |
| 18 |
); |
| 19 |
|
| 20 |
my $log = $out->{log}->name; |
| 21 |
|
| 22 |
yath( |
| 23 |
command => 'times', |
| 24 |
args => [$log], |
| 25 |
exit => 0, |
| 26 |
test => sub { |
| 27 |
my $out = shift; |
| 28 |
|
| 29 |
like($out->{output}, qr{Total .* Startup .* Events .* Cleanup .* File}m, "Got header"); |
| 30 |
like($out->{output}, qr{t/integration/times/pass\.tx}m, "Got pass line"); |
| 31 |
like($out->{output}, qr{t/integration/times/pass2\.tx}m, "Got pass2 line"); |
| 32 |
like($out->{output}, qr{TOTAL}m, "Got total line"); |
| 33 |
}, |
| 34 |
); |
| 35 |
|
| 36 |
done_testing; |