diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-03 00:07:50 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-03 00:07:50 +0200 |
commit | 8858d25ce886b86d80b133c74e62cc3ac2f732d5 (patch) | |
tree | abca3e03155a8a52236bb1c6c34e344fde8251aa | |
parent | 9f76e39ed86b0aaa0994e19748c56180963003fb (diff) | |
download | sbotools2-8858d25ce886b86d80b133c74e62cc3ac2f732d5.tar.xz |
16-clean.t: test sboclean -w with $TMP set
-rwxr-xr-x | t/16-clean.t | 5 |
1 files changed, 3 insertions, 2 deletions
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/ }; } |