diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-09 15:31:41 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-09 15:31:41 +0200 |
commit | c405a7a9e9d1843ed9977ab3d001558891a4213d (patch) | |
tree | 8ad210efaa66ff0d1901c0b50dd6ffd890070200 | |
parent | 3a0080481e4b1a1664fadbf1696c581b29f3cffa (diff) | |
download | sbotools2-c405a7a9e9d1843ed9977ab3d001558891a4213d.tar.xz |
05-upgrade.t: add test for answering with defaults and answering weirdly
-rwxr-xr-x | t/05-upgrade.t | 6 |
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(); |