aboutsummaryrefslogtreecommitdiff
path: root/t/04-install.t
diff options
context:
space:
mode:
Diffstat (limited to 't/04-install.t')
-rwxr-xr-xt/04-install.t19
1 files changed, 11 insertions, 8 deletions
diff --git a/t/04-install.t b/t/04-install.t
index 0f3eed4..dee5421 100755
--- a/t/04-install.t
+++ b/t/04-install.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 => 10;
+ plan tests => 11;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -48,31 +48,34 @@ ok (! -e "$RealBin/LO/nonexistentslackbuild/perf.dummy", "Source symlink removed
ok (-e "/usr/sbo/repo/SLACKBUILDS.TXT", "SLACKBUILDS.TXT has been migrated back to its proper place");
sboremove 'nonexistentslackbuild', { input => "y\ny", test => 0 };
-# 4: sboinstall nonexistentslackbuild2
+# 4-5: sboinstall nonexistentslackbuild2
+system("mv /usr/sbo/repo/* /usr/sbo");
+system(qw! rmdir /usr/sbo/repo !);
sboinstall 'nonexistentslackbuild2', { exit => 1, expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\n" };
+ok (-e "/usr/sbo/repo/SLACKBUILDS.TXT", "SLACKBUILDS.TXT has been migrated back after repo dir was deleted");
-# 5: sboinstall nonexistentslackbuild3
+# 6: sboinstall nonexistentslackbuild3
sboinstall 'nonexistentslackbuild3', { exit => 1, expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\n" };
-# 6: sboinstall nonexistentslackbuild4
+# 7: sboinstall nonexistentslackbuild4
sboinstall 'nonexistentslackbuild4', { input => "y\ny\ny",
expected => qr/nonexistentslackbuild5 added to install queue.*nonexistentslackbuild4 added to install queue.*Install queue: nonexistentslackbuild5 nonexistentslackbuild4/s };
sboremove 'nonexistentslackbuild5', { input => "y\ny", test => 0 };
-# 7: sboinstall nonexistentslackbuild5
+# 8: sboinstall nonexistentslackbuild5
sboinstall 'nonexistentslackbuild5', { input => "y\ny", expected => qr/nonexistentslackbuild5 added to install queue.*Install queue: nonexistentslackbuild5/s };
sboremove 'nonexistentslackbuild4', { input => "y\ny\ny", test => 0 };
-# 8: sboinstall nonexistentslackbuild4
+# 9: sboinstall nonexistentslackbuild4
sboinstall 'nonexistentslackbuild4', { input => "y\ny\ny",
expected => qr/nonexistentslackbuild5 added to install queue.*nonexistentslackbuild4 added to install queue.*Install queue: nonexistentslackbuild5 nonexistentslackbuild4/s };
sboremove 'nonexistentslackbuild5', { input => "y\ny", test => 0 };
-# 9: sboinstall nonexistentslackbuild4
+# 10: sboinstall nonexistentslackbuild4
sboinstall 'nonexistentslackbuild4', { input => "y\ny", expected => qr/nonexistentslackbuild5 added to install queue.*Install queue: nonexistentslackbuild5/s };
sboremove 'nonexistentslackbuild4', 'nonexistentslackbuild5', { input => "y\ny\ny", test => 0 };
-# 10: sboinstall nonexistentslackbuild6
+# 11: sboinstall nonexistentslackbuild6
sboinstall 'nonexistentslackbuild6', { input => "y\ny", expected => qr/aaa_base already installed.*nonexistentslackbuild6 added to install queue.*Install queue: nonexistentslackbuild6/s };
# Cleanup