mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests: keep env vars for the temporary directory
On some Windows machines this would otherwise cause `std::env::temp_dir` to fall back to a path that is not writeable (C:\\Windows). Since by default integration tests don't inherit env vars from the parent, we have to override this in some cases.
This commit is contained in:
parent
115eb5eb52
commit
e5a7bcbb9d
2 changed files with 12 additions and 7 deletions
|
@ -386,7 +386,7 @@ fn test_mktemp_tmpdir_one_arg() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
|
||||
let result = scene
|
||||
.ucmd()
|
||||
.ucmd_keepenv()
|
||||
.arg("--tmpdir")
|
||||
.arg("apt-key-gpghome.XXXXXXXXXX")
|
||||
.succeeds();
|
||||
|
@ -399,7 +399,7 @@ fn test_mktemp_directory_tmpdir() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
|
||||
let result = scene
|
||||
.ucmd()
|
||||
.ucmd_keepenv()
|
||||
.arg("--directory")
|
||||
.arg("--tmpdir")
|
||||
.arg("apt-key-gpghome.XXXXXXXXXX")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue