diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-15 11:05:50 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-15 11:05:50 +0100 |
commit | 06f3802f4c8a3d2f92e053777c90f6592420146a (patch) | |
tree | 1027ffcccc8b3c441b66643ee2780f1b36d06336 | |
parent | 87e3cc8e20b515b098700d2c54b6a94884cff142 (diff) | |
download | sbotools2-06f3802f4c8a3d2f92e053777c90f6592420146a.tar.xz |
Correct test plan
-rwxr-xr-x | t/travis.t | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -8,7 +8,7 @@ use Capture::Tiny qw/ capture_merged /; use FindBin '$RealBin'; if (defined $ENV{TRAVIS} and $ENV{TRAVIS} eq 'true') { - plan tests => 23; + plan tests => 24; } else { plan skip_all => 'Only run these tests under Travis CI (TRAVIS=true)'; } @@ -53,7 +53,7 @@ SKIP: { is (run(cmd => [qw/ sbofind sbotools /]), "SBo: sbotools\nPath: /usr/sbo/repo/system/sbotools\n\n", 'sbofind works'); } -# 11-16: Test local overrides +# 11-17: Test local overrides is (run(cmd => [qw/ sboconfig -o /, "$RealBin/LO"]), "Setting LOCAL_OVERRIDES to $RealBin/LO...\n", 'setting LOCAL_OVERRIDES works'); my $skip = 0; SKIP: { @@ -76,13 +76,13 @@ LOCAL like (run(cmd => [qw/ sboupgrade -r nonexistentslackbuild /]), qr/nonexistentslackbuild added to upgrade queue.*Upgrade queue: nonexistentslackbuild/s, 'sboupgrade upgrades old version'); -# 17-18: Test missing dep +# 18-19: Test missing dep my ($output, $ret) = capture_merged { system(qw/bash -c/, "$^X -I$lib $path/sboinstall nonexistentslackbuild2 <<END\ny\nEND\n") and $? >> 8; }; is ($ret, 1, "sboinstall nonexistentslackbuild2 has correct exit code"); is ($output, "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\n", 'sboinstall nonexistentslackbuild2 has correct output'); } -# 19-23: Test sboupgrade --all +# 20-24: Test sboupgrade --all SKIP: { my @files = glob("/var/log/packages/nonexistentslackbuild-*"); skip 'nonexistentslackbuild not installed', 1 if @files == 0; |