1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 21:47:46 +00:00

mktemp: note that windows uses a different env var for tmpdir

On windows `std::env::temp_dir` uses the `TMP` environment variable
instead of `TMPDIR`.
This commit is contained in:
Michael Debertol 2021-06-22 17:36:56 +02:00
parent e5a7bcbb9d
commit 622504467f
2 changed files with 5 additions and 2 deletions

View file

@ -17,7 +17,10 @@ static TEST_TEMPLATE8: &str = "tempXXXl/ate";
#[cfg(windows)]
static TEST_TEMPLATE8: &str = "tempXXXl\\ate";
#[cfg(not(windows))]
const TMPDIR: &str = "TMPDIR";
#[cfg(windows)]
const TMPDIR: &str = "TMP";
#[test]
fn test_mktemp_mktemp() {