From 258a54ba58e6f51d16bfcb1291076c642766343e Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 29 Apr 2016 00:24:15 +0200 Subject: 06-remove.t: test handling of not found and not installed sbos --- t/06-remove.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't/06-remove.t') 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(); -- cgit v1.2.3