From 8858d25ce886b86d80b133c74e62cc3ac2f732d5 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Tue, 3 May 2016 00:07:50 +0200 Subject: 16-clean.t: test sboclean -w with $TMP set --- t/16-clean.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/16-clean.t b/t/16-clean.t index a9624a1..d46ede0 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 => 14; +plan tests => 15; my $sboname = "nonexistentslackbuild"; my $perf = "/usr/sbo/distfiles/perf.dummy"; @@ -77,9 +77,10 @@ sboclean { exit => 1, expected => "You must specify at least one of -d or -w.\n" set_sbo_home(tempdir(CLEANUP => 1)); sboclean '-d', { exit => 0, expected => "Nothing to do.\n" }; -# 13-14: sboclean -w -i with TMP set +# 13-15: 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! }; + sboclean '-w', { input => "y", expected => qr/This will remove the entire contents of \Q$ENV{TMP}\E/ }; } -- cgit v1.2.3