diff --git a/tests/by-util/test_mktemp.rs b/tests/by-util/test_mktemp.rs index 652f32a40..306f147d8 100644 --- a/tests/by-util/test_mktemp.rs +++ b/tests/by-util/test_mktemp.rs @@ -879,10 +879,16 @@ fn test_empty_tmpdir_env_var() { stderr.starts_with("mktemp: failed to create file via template"), "{stderr}" ); + #[cfg(windows)] assert!( stderr.ends_with("/tmp\\tmp.XXXXXXXXXX': No such file or directory\n"), "{stderr}", ); + #[cfg(target_os = "android")] + assert!( + stderr.ends_with("/tmp/tmp.XXXXXXXXXX': No such file or directory\n"), + "{stderr}", + ); } #[cfg(not(any(windows, target_os = "android")))] @@ -900,10 +906,16 @@ fn test_empty_tmpdir_env_var() { stderr.starts_with("mktemp: failed to create directory via template"), "{stderr}" ); + #[cfg(windows)] assert!( stderr.ends_with("/tmp\\tmp.XXXXXXXXXX': No such file or directory\n"), "{stderr}", ); + #[cfg(target_os = "android")] + assert!( + stderr.ends_with("/tmp/tmp.XXXXXXXXXX': No such file or directory\n"), + "{stderr}", + ); } }