| 1 |
use Test2::V0; |
| 2 |
|
| 3 |
use Config qw/%Config/; |
| 4 |
use File::Temp qw/tempfile/; |
| 5 |
use File::Spec; |
| 6 |
|
| 7 |
use App::Yath::Tester qw/yath/; |
| 8 |
use Test2::Harness::Util::File::JSONL; |
| 9 |
|
| 10 |
use Test2::Harness::Util qw/clean_path/; |
| 11 |
use Test2::Harness::Util::JSON qw/decode_json/; |
| 12 |
|
| 13 |
my $dir = __FILE__; |
| 14 |
$dir =~ s{\.t$}{}g; |
| 15 |
$dir =~ s{^\./}{}; |
| 16 |
|
| 17 |
# Make it very wrong to start |
| 18 |
local $ENV{T2_HARNESS_IS_VERBOSE} = 99; |
| 19 |
local $ENV{HARNESS_IS_VERBOSE} = 99; |
| 20 |
|
| 21 |
yath( |
| 22 |
command => 'test', |
| 23 |
args => [File::Spec->catfile($dir, "not_verbose.tx")], |
| 24 |
exit => F(), |
| 25 |
); |
| 26 |
|
| 27 |
yath( |
| 28 |
command => 'test', |
| 29 |
args => ['-v', File::Spec->catfile($dir, "verbose1.tx")], |
| 30 |
exit => F(), |
| 31 |
); |
| 32 |
|
| 33 |
yath( |
| 34 |
command => 'test', |
| 35 |
args => ['-vv', File::Spec->catfile($dir, "verbose2.tx")], |
| 36 |
exit => F(), |
| 37 |
); |
| 38 |
|
| 39 |
done_testing; |