aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-29 00:24:15 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-29 00:24:15 +0200
commit258a54ba58e6f51d16bfcb1291076c642766343e (patch)
treee3128f6d78d3b810ea615335f0d0a77423d83d0b
parent2721f90643748667765ec083610fbd8f2724ec19 (diff)
downloadsbotools2-258a54ba58e6f51d16bfcb1291076c642766343e.tar.xz
06-remove.t: test handling of not found and not installed sbos
-rwxr-xr-xt/06-remove.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/06-remove.t b/t/06-remove.t
index 322b8f7..686ae16 100755
--- a/t/06-remove.t
+++ b/t/06-remove.t
@@ -10,7 +10,7 @@ use lib $RealBin;
use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboinstall sboremove /;
if ($ENV{TEST_INSTALL}) {
- plan tests => 4;
+ plan tests => 5;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -55,6 +55,10 @@ sboinstall 'nonexistentslackbuild4', { input => "y\ny\ny", test => 0 };
sboremove qw/ nonexistentslackbuild4 nonexistentslackbuild5 /, { input => "y\ny\ny",
expected => qr/Remove nonexistentslackbuild4\b.*Remove nonexistentslackbuild5\b.*Removing 2 package\(s\)/s };
+# 5: sboremove namethatdoesntexist slackbuildthatisntinstalld
+sboremove qw/ nonexistentslackbuildwhosenamedoesntexist nonexistentslackbuild /,
+ { exit => 1, expected => "Unable to locate nonexistentslackbuildwhosenamedoesntexist in the SlackBuilds.org tree.\nnonexistentslackbuild is not installed\n" };
+
# Cleanup
END {
cleanup();