aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/04-install.t2
-rwxr-xr-xt/05-upgrade.t6
2 files changed, 6 insertions, 2 deletions
diff --git a/t/04-install.t b/t/04-install.t
index f1f922f..b318d60 100755
--- a/t/04-install.t
+++ b/t/04-install.t
@@ -50,7 +50,7 @@ ok (-e "/usr/sbo/repo/SLACKBUILDS.TXT", "SLACKBUILDS.TXT has been migrated back
sboremove 'nonexistentslackbuild', { input => "y\ny", test => 0 };
# 4: sboinstall nonexistentslackbuild2
-sboinstall 'nonexistentslackbuild2', { exit => 1, expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\n" };
+sboinstall 'nonexistentslackbuild2', { exit => 0, expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\nDo you want to ignore it and continue? [n] ", input => "n" };
# 5: sboinstall nonexistentslackbuild3
sboinstall 'nonexistentslackbuild3', { exit => 1, expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\n" };
diff --git a/t/05-upgrade.t b/t/05-upgrade.t
index 44037c6..1d7d541 100755
--- a/t/05-upgrade.t
+++ b/t/05-upgrade.t
@@ -11,7 +11,7 @@ use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboconfig sboinstall sboupgra
use File::Temp 'tempdir';
if ($ENV{TEST_INSTALL}) {
- plan tests => 21;
+ plan tests => 22;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -149,6 +149,10 @@ sboupgrade qw/ -r nonexistentslackbuild /, { expected => "" };
install('LO2', 'nonexistentslackbuild', 'nonexistentslackbuild5');
sboupgrade qw/nonexistentslackbuild nonexistentslackbuild5/, { input => "foo\n\nn\nn\n", expected => qr/Proceed with nonexistentslackbuild\?.*Proceed with nonexistentslackbuild\?.*Proceed with nonexistentslackbuild5\?.*Upgrade queue: nonexistentslackbuild$/sm };
+# 22: sboupgrade on something installed with no-longer-existing dep
+install('LO', 'nonexistentslackbuild2');
+sboupgrade qw/ -f -z nonexistentslackbuild2 /, { input => "n", expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\nDo you want to ignore it and continue? [n] " };
+
# Cleanup
END {
cleanup();