diff --git a/t/03-count.t b/t/03-count.t index bf0dd4dcb1f963eb06ddc8e34bda5c4393139026..2f9d4207fb775a2d41b755ae265662b8bdd1cc72 100644 --- a/t/03-count.t +++ b/t/03-count.t @@ -1,6 +1,6 @@ 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'); diff --git a/t/03-report.t b/t/03-report.t index 0e23e2b6100c75beeb919899ec240b7b767e3d87..f427e871dba3b68b97a148b0749abb5396a25395 100644 --- a/t/03-report.t +++ b/t/03-report.t @@ -1,7 +1,7 @@ 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; diff --git a/t/03-search.t b/t/03-search.t index 6a910e489fefb59754162b48234f59c72646c6aa..2c31d00642814a2c858c39ddf88da555892a7f61 100644 --- a/t/03-search.t +++ b/t/03-search.t @@ -1,6 +1,6 @@ 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;