Skip to content
Snippets Groups Projects
Commit cc5f4e22 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added help testcases

parent 5747e396
No related branches found
No related tags found
No related merge requests found
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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment