diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-03-25 16:43:31 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-03-25 16:43:31 +0100 |
commit | cb80660314d757f449561c9cce7fb598a07a81ce (patch) | |
tree | 401b96a63611a166eb06bfbc86b8f059ef834197 | |
parent | 76cc38696c0e28407296f1a07d6e70921307c14c (diff) | |
download | sbotools2-cb80660314d757f449561c9cce7fb598a07a81ce.tar.xz |
t/04-install.t: add tests for --reinstall option
See #58.
-rwxr-xr-x | t/04-install.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/04-install.t b/t/04-install.t index ea7b07c..f1f922f 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 restore_perf_dummy /; if ($ENV{TEST_INSTALL}) { - plan tests => 20; + plan tests => 22; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -112,6 +112,10 @@ sboinstall 'perl-nonexistentcpan', { input => "n", expected => qr/Proceed with p sboinstall '-p', 'foo', { expected => "compat32 only works on x86_64.\n", exit => 1 }; } +# 21-22: check --reinstall option +sboinstall '--reinstall', 'nonexistentslackbuild', { input => "n", expected => qr/\Qnonexistentslackbuild (nonexistentslackbuild-1.0-noarch-1_SBo) is already installed. Do you want to reinstall from SBo? [n]\E/ }; +sboinstall '--reinstall', 'nonexistentslackbuild', { input => "y\ny\ny", expected => qr/nonexistentslackbuild .* is already installed[.] Do you want to reinstall.*Install queue: nonexistentslackbuild/s }; + # Cleanup END { cleanup(); |