From 30065a240f6f58cb7e7d4f5663402b40c07b8aef Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Thu, 28 Apr 2016 20:27:51 +0200 Subject: 16-clean.t: test sboclean -d with SBO_HOME set --- t/16-clean.t | 9 +++++++-- 1 file 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" }; -- cgit v1.2.3