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

- added help checks

parent eb95cd82
No related branches found
No related tags found
No related merge requests found
use v5.36;
use Test::Cmd;
use Test::More tests =>18;
use Test::More tests =>27;
use Path::Tiny;
my $perl = $^X;
my $testapp = Test::Cmd->new(
......@@ -27,6 +27,15 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9
user: lza
_CFG_
# tests
note "help check";
foreach my $param ("help count", "count -h", "count --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 "check cli params";
$testapp->run(args =>'count --lzaid SLUB:LZA:goobi:1 --debug');
......
use v5.36;
use Test::Cmd;
use Test::More tests =>6;
use Test::More tests =>15;
use Path::Tiny;
my $perl = $^X;
my $testapp = Test::Cmd->new(
......@@ -28,6 +28,16 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9
user: lza
_CFG_
# tests
note "help check";
foreach my $param ("help report", "report -h", "report --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 "check cli params";
$testapp->run(args =>'report');
#say "STDOUT:",$testapp->stdout;
......
use v5.36;
use Test::Cmd;
use Test::More tests =>99;
use Test::More tests =>108;
use Path::Tiny;
my $perl = $^X;
my $testapp = Test::Cmd->new(
......@@ -27,6 +27,16 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9
user: lza
_CFG_
# tests
note "help check";
foreach my $param ("help search", "search -h", "search --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 "check cli params";
$testapp->run(args =>'search --lzaid SLUB:LZA:goobi:1 --debug');
#say "STDOUT:",$testapp->stdout;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment