mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
mktemp: uncomment fixed test case
Uncomment a test case fixed by commit
53c4b0b81e
(pull request
https://github.com/uutils/coreutils/pull/4091).
This commit is contained in:
parent
f056a74432
commit
1de1a84ed2
1 changed files with 12 additions and 10 deletions
|
@ -704,16 +704,18 @@ fn test_tmpdir_env_var() {
|
|||
assert_suffix_matches_template!("tmp.XXXXXXXXXX", filename);
|
||||
assert!(at.file_exists(filename));
|
||||
|
||||
// FIXME This is not working because --tmpdir is configured to
|
||||
// require a value.
|
||||
//
|
||||
// // `TMPDIR=. mktemp --tmpdir`
|
||||
// let (at, mut ucmd) = at_and_ucmd!();
|
||||
// let result = ucmd.env(TMPDIR, ".").arg("--tmpdir").succeeds();
|
||||
// let filename = result.no_stderr().stdout_str().trim_end();
|
||||
// let template = format!(".{}tmp.XXXXXXXXXX", MAIN_SEPARATOR);
|
||||
// assert_matches_template!(&template, filename);
|
||||
// assert!(at.file_exists(filename));
|
||||
// `TMPDIR=. mktemp --tmpdir`
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.env(TMPDIR, ".").arg("--tmpdir").succeeds();
|
||||
let filename = result.no_stderr().stdout_str().trim_end();
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
let template = format!(".{MAIN_SEPARATOR}tmp.XXXXXXXXXX");
|
||||
assert_matches_template!(&template, filename);
|
||||
}
|
||||
#[cfg(windows)]
|
||||
assert_suffix_matches_template!("tmp.XXXXXXXXXX", filename);
|
||||
assert!(at.file_exists(filename));
|
||||
|
||||
// `TMPDIR=. mktemp --tmpdir XXX`
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Reference in a new issue