commit 258a54ba58e6f51d16bfcb1291076c642766343e
parent 2721f90643748667765ec083610fbd8f2724ec19
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Fri, 29 Apr 2016 00:24:15 +0200
06-remove.t: test handling of not found and not installed sbos
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git 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();