From c405a7a9e9d1843ed9977ab3d001558891a4213d Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 9 Sep 2016 15:31:41 +0200 Subject: 05-upgrade.t: add test for answering with defaults and answering weirdly --- t/05-upgrade.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3