aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-09 15:31:41 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-09 15:31:41 +0200
commitc405a7a9e9d1843ed9977ab3d001558891a4213d (patch)
tree8ad210efaa66ff0d1901c0b50dd6ffd890070200
parent3a0080481e4b1a1664fadbf1696c581b29f3cffa (diff)
downloadsbotools2-c405a7a9e9d1843ed9977ab3d001558891a4213d.tar.xz
05-upgrade.t: add test for answering with defaults and answering weirdly
-rwxr-xr-xt/05-upgrade.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/05-upgrade.t b/t/05-upgrade.t
index 2b7a015..e9b9ceb 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 => 19;
+ plan tests => 20;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -134,6 +134,10 @@ sboupgrade qw/ -r -f nonexistentslackbuild2 /, { expected => "" };
# 19: sboupgrade -r on something already up to date
sboupgrade qw/ -r nonexistentslackbuild /, { expected => "" };
+# 20: sboupgrade and answer weirdly and use a default and then answer no twice
+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 };
+
# Cleanup
END {
cleanup();