From 921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Tue, 21 Jan 2025 16:11:42 -0500 Subject: Avoid requiring root access Make temporary folder generation lazy to postpone requiring root access until needed. --- t/16-clean.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 't/16-clean.t') diff --git a/t/16-clean.t b/t/16-clean.t index b695ae8..f756963 100755 --- a/t/16-clean.t +++ b/t/16-clean.t @@ -86,6 +86,8 @@ sboclean '-d', { exit => 0, expected => "Nothing to do.\n" }; # 13-15: sboclean -w [-i] with TMP set { local $ENV{TMP} = tempdir(CLEANUP => 1); + set_sbo_home("/usr/sbo"); + sboinstall qw/ -r nonexistentslackbuild /, { test => 0 }; 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