commit c405a7a9e9d1843ed9977ab3d001558891a4213d
parent 3a0080481e4b1a1664fadbf1696c581b29f3cffa
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Fri, 9 Sep 2016 15:31:41 +0200
05-upgrade.t: add test for answering with defaults and answering weirdly
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git 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();