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

- added more tests

parent d5ff652d
No related branches found
No related tags found
No related merge requests found
use v5.36; use v5.36;
use Test::Cmd; use Test::Cmd;
use Test::More tests =>4; use Test::More tests =>10;
use Path::Tiny; use Path::Tiny;
my $perl = $^X; my $perl = $^X;
my $testapp = Test::Cmd->new( my $testapp = Test::Cmd->new(
...@@ -12,8 +12,10 @@ my $testapp = Test::Cmd->new( ...@@ -12,8 +12,10 @@ my $testapp = Test::Cmd->new(
); );
# tests # tests
ok($testapp, "init 'ta-tool'"); ok($testapp, "init 'ta-tool'");
$testapp->run(args =>'--help'); foreach my $param (qw(--help -h help)) {
like($testapp->stdout, qr/Available commands:/, 'ta-tool --help, stdout'); $testapp->run(args => $param);
like($testapp->stderr, qr/^$/, 'ta-tool --help, stderr'); like($testapp->stdout, qr/Available commands:/, "ta-tool $param, stdout");
is($? >> 8, 0, 'ta-tool --help, exit status'); like($testapp->stderr, qr/^$/, "ta-tool $param, stderr");
is($? >> 8, 0, "ta-tool $param, exit status");
}
1; 1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment