diff options
author | Slack Coder <slackcoder@server.ky> | 2025-01-21 16:11:42 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2025-01-28 11:31:35 -0500 |
commit | 921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c (patch) | |
tree | b2b0fa36ce53922c20538e8e5b4aeff8811eb2e0 /t | |
parent | da89dd975499f6b228d75fa5f25871911fae658a (diff) | |
download | sbotools2-921e9a76f1ca47d30d765f2f2bf61954e8ac9c9c.tar.xz |
Avoid requiring root access
Make temporary folder generation lazy to postpone requiring root access
until needed.
Diffstat (limited to 't')
-rwxr-xr-x | t/07-fail.t | 2 | ||||
-rwxr-xr-x | t/16-clean.t | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/t/07-fail.t b/t/07-fail.t index cd1fa7c..fd1db42 100755 --- a/t/07-fail.t +++ b/t/07-fail.t @@ -11,7 +11,7 @@ use Test::Sbotools qw/ make_slackbuilds_txt set_lo set_repo sboconfig sboinstall use File::Temp 'tempdir'; if ($ENV{TEST_INSTALL}) { - plan tests => 24; + plan tests => 26; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } 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/ }; |