diff --git a/t/03-info.t b/t/03-info.t index 9e21b1cfd18be3eea620fc1dda3d65877e4a6da0..4c58b07aaa0f495a485374b702fde9ca12e06777 100644 --- a/t/03-info.t +++ b/t/03-info.t @@ -1,6 +1,6 @@ use v5.36; use Test::Cmd; -use Test::More tests =>3; +use Test::More tests =>12; use Path::Tiny; my $perl = $^X; my $testapp = Test::Cmd->new( @@ -27,12 +27,20 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9 user: lza _CFG_ # tests + +foreach my $param ("help info", "info -h", "info --help") { + $testapp->run(args => $param); + #say "STDOUT:",$testapp->stdout; + #say "STDERR:",$testapp->stderr; + like($testapp->stdout, qr/this usage screen/, "ta-tool $param, stdout"); + like($testapp->stderr, qr/^$/, "ta-tool $param, stderr"); + is($? >> 8, 0, "ta-tool $param, exit status"); +} + note "elastic search version"; $testapp->run(args =>'info --target-version'); like($testapp->stdout, qr/^6\.\d\.\d{1,2}$/, 'ta-tool elasticsearch version, stdout'); like($testapp->stderr, qr/^$/, 'ta-tool elasticsearch version, stderr'); is($? >> 8, 0, 'ta-tool elasticsearch version, exit status'); - - 1;