aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/16-clean.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/16-clean.t b/t/16-clean.t
index 9e2901d..a9624a1 100755
--- a/t/16-clean.t
+++ b/t/16-clean.t
@@ -11,7 +11,7 @@ use Test::Sbotools qw/ make_slackbuilds_txt set_distclean set_noclean set_lo sbo
use SBO::Lib;
use File::Temp 'tempdir';
-plan tests => 12;
+plan tests => 14;
my $sboname = "nonexistentslackbuild";
my $perf = "/usr/sbo/distfiles/perf.dummy";
@@ -76,3 +76,10 @@ 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" };
+
+# 13-14: sboclean -w -i with TMP set
+{
+ local $ENV{TMP} = tempdir(CLEANUP => 1);
+ sboclean qw/ -w -i /, { input => "n", expected => qr!\QRemove $ENV{TMP}/\E.*\Q? [n]\E! };
+ sboclean qw/ -w -i /, { input => "y\ny", expected => qr!\QRemove $ENV{TMP}/\E.*\Q? [n]\E! };
+}