From dc2911fc741e36311db8134a2adedb56802f1aa5 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 27 Apr 2019 13:30:13 +0200 Subject: sboinstall, Build, Info: Allow ignoring of SBo from reqs that doesn't exist --- t/05-upgrade.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't/05-upgrade.t') diff --git a/t/05-upgrade.t b/t/05-upgrade.t index 44037c6..1d7d541 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 => 21; + plan tests => 22; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -149,6 +149,10 @@ sboupgrade qw/ -r nonexistentslackbuild /, { expected => "" }; 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 }; +# 22: sboupgrade on something installed with no-longer-existing dep +install('LO', 'nonexistentslackbuild2'); +sboupgrade qw/ -f -z nonexistentslackbuild2 /, { input => "n", expected => "Unable to locate nonexistentslackbuild3 in the SlackBuilds.org tree.\nDo you want to ignore it and continue? [n] " }; + # Cleanup END { cleanup(); -- cgit v1.2.3