sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit c8924920c00a522f04535739d5bd4d86f80ac3f4
parent 09c04b9118181f780a01e739f62ae83bb9811063
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Mon,  1 Aug 2016 20:30:12 +0200

13-local-check.t: test when an sbo is no longer available

Diffstat:
Mt/13-local-check.t | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/t/13-local-check.t b/t/13-local-check.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ make_slackbuilds_txt set_lo set_repo sbosnap sbocheck sboinstall sbofind restore_perf_dummy /; if ($ENV{TEST_INSTALL} and $ENV{TRAVIS}) { - plan tests => 13; + plan tests => 14; } else { plan skip_all => "Only run these tests if TEST_INSTALL=1 and we're running under Travis CI"; } @@ -19,6 +19,7 @@ sub cleanup { capture_merged { system(qw!/sbin/removepkg nonexistentslackbuild!); system(qw!/sbin/removepkg nonexistentslackbuild5!); + system(qw!/sbin/removepkg nonexistentslackbuild8!); system(qw!/sbin/removepkg nonexistentslackbuildwithareallyverylongnameasyoucansee!); system(qw!/sbin/removepkg s!); system(qw!/sbin/removepkg nonexistentslackbuildwithareallyverylo!); @@ -30,6 +31,7 @@ sub cleanup { unlink "$RealBin/LO/weird-versionsbo/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); + system(qw!rm -rf /tmp/SBo/nonexistentslackbuild8-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuildwithareallyverylongnameasyoucansee-1.0!); system(qw!rm -rf /tmp/SBo/s-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuildwithareallyverylo-1.0!); @@ -39,6 +41,7 @@ sub cleanup { system(qw!rm -rf /tmp/SBo/weird-versionsbo-1.0!); system(qw!rm -rf /tmp/package-nonexistentslackbuild!); system(qw!rm -rf /tmp/package-nonexistentslackbuild5!); + system(qw!rm -rf /tmp/package-nonexistentslackbuild8!); system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylongnameasyoucansee!); system(qw!rm -rf /tmp/package-s!); system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylo!); @@ -155,6 +158,14 @@ set_lo("$RealBin/LO"); sboinstall 'weird-versionsbo', { input => "y\ny", test => 0 }; sbocheck { expected => sub { not /weird-versionsbo/ } }; +# 14: check sbo no longer available +cleanup(); +setup_gitrepo(); +sbosnap 'update', { test => 0 }; +sboinstall 'nonexistentslackbuild8', { input => "y\ny", test => 0 }; +set_lo("$RealBin/LO2"); +sbocheck { expected => qr/No updates available[.]/ }; + # Cleanup END { cleanup();