diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-09 23:44:18 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-09 23:44:18 +0200 |
commit | 362b6c71c2aebca8ffeef1718e7cd50e9563d65b (patch) | |
tree | 49b8a8eb23d68d6bd53f5525a765d189ac68f807 /t/16-clean.t | |
parent | 38166540acae689303c691230f3775e6a0301753 (diff) | |
download | sbotools2-362b6c71c2aebca8ffeef1718e7cd50e9563d65b.tar.xz |
16-clean.t: test sboupgrade -c TRUE
Diffstat (limited to 't/16-clean.t')
-rwxr-xr-x | t/16-clean.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/16-clean.t b/t/16-clean.t index f935c10..c45fb92 100755 --- a/t/16-clean.t +++ b/t/16-clean.t @@ -7,18 +7,18 @@ use Test::More; use Capture::Tiny qw/ capture_merged /; use FindBin '$RealBin'; use lib $RealBin; -use Test::Sbotools qw/ make_slackbuilds_txt set_distclean set_noclean set_lo sboinstall sboclean sboremove restore_perf_dummy set_sbo_home /; +use Test::Sbotools qw/ make_slackbuilds_txt set_distclean set_noclean set_lo sboinstall sboclean sboremove restore_perf_dummy set_sbo_home sboupgrade /; use SBO::Lib; use File::Temp 'tempdir'; -plan tests => 15; +plan tests => 16; my $sboname = "nonexistentslackbuild"; my $perf = "/usr/sbo/distfiles/perf.dummy"; sub cleanup { capture_merged { system('removepkg', $sboname); - system(qw! rm -rf !, "/tmp/SBo/$sboname-1.0"); + system(qw! rm -rf !, "/tmp/SBo/$sboname-1.0", "/tmp/SBo/$sboname-1.1"); } } @@ -85,3 +85,11 @@ sboclean '-d', { exit => 0, expected => "Nothing to do.\n" }; sboclean qw/ -w -i /, { input => "y\ny", expected => qr!\QRemove $ENV{TMP}/\E.*\Q? [n]\E! }; sboclean '-w', { input => "y", expected => qr/This will remove the entire contents of \Q$ENV{TMP}\E/ }; } + +# 16: sboupgrade -c TRUE +set_sbo_home("/usr/sbo"); +sboinstall qw/ -r nonexistentslackbuild /, { test => 0 }; +set_lo "$RealBin/LO2"; +sboupgrade qw/ -c TRUE nonexistentslackbuild /, { input => "y\ny", test => 0 }; +ok (-e "/tmp/SBo/$sboname-1.1", "$sboname-1.1 exists when NOCLEAN set to true in sboupgrade."); +cleanup(); |