diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-28 20:27:51 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-28 20:27:51 +0200 |
commit | 30065a240f6f58cb7e7d4f5663402b40c07b8aef (patch) | |
tree | a86ad24b1297299e33b74f1d7b0bce1dc13ce41a | |
parent | 3b00c411e2109d9f9113528c5de4e9d28ab5c8f8 (diff) | |
download | sbotools2-30065a240f6f58cb7e7d4f5663402b40c07b8aef.tar.xz |
16-clean.t: test sboclean -d with SBO_HOME set
-rwxr-xr-x | t/16-clean.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/16-clean.t b/t/16-clean.t index f5f0399..9e2901d 100755 --- a/t/16-clean.t +++ b/t/16-clean.t @@ -7,10 +7,11 @@ 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 /; +use Test::Sbotools qw/ make_slackbuilds_txt set_distclean set_noclean set_lo sboinstall sboclean sboremove restore_perf_dummy set_sbo_home /; use SBO::Lib; +use File::Temp 'tempdir'; -plan tests => 11; +plan tests => 12; my $sboname = "nonexistentslackbuild"; my $perf = "/usr/sbo/distfiles/perf.dummy"; @@ -71,3 +72,7 @@ cleanup(); # 11: check that sboclean errors properly without arguments sboclean { exit => 1, expected => "You must specify at least one of -d or -w.\n" }; + +# 12: sboclean -d with SBOHOME set +set_sbo_home(tempdir(CLEANUP => 1)); +sboclean '-d', { exit => 0, expected => "Nothing to do.\n" }; |