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

- init

parent 4c79734a
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::TA;
my $testapp = Test::TA::testapp();
my $host = Test::TA::testhost();
local $ENV{'HOME'} = $testapp->workpath();
# tests
subtest 'help check' => sub {
plan tests => 9;
foreach my $param ("help permanent", "permanent -h", "permanent --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");
}
};
subtest 'check permanent volumes' => sub {
plan tests => 3;
SKIP: {
skip "testhost '$host' not available", 3 unless Test::TA::is_testhost_available();
$testapp->run(args => 'permanent');
like($testapp->stdout, qr/\n:doctype: article/s, 'ta-tool permanent, stdout');
like($testapp->stderr, qr/^$/, 'ta-tool permanent, stderr');
is($? >> 8, 0, 'ta-tool permanent, exit status');
};
};
subtest 'overrides' => sub {
plan tests => 3;
SKIP: {
skip "testhost '$host' not available", 3 unless Test::TA::is_testhost_available();
$testapp->run(args => 'permanent --permanent-volume foo');
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\n:doctype: article/s, 'ta-tool permanent, override, stdout');
like($testapp->stderr, qr/^Hint: override local config/, 'ta-tool permanent, override, stderr');
is($? >> 8, 0, 'ta-tool permanent, override, exit status');
};
};
1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment