failure expected on android

temp directory is not located at /tmp
This commit is contained in:
Reuben Wong
2026-01-31 00:02:49 +08:00
parent 2fd74a89dc
commit 8001be0335
+4 -4
View File
@@ -864,13 +864,13 @@ fn test_nonexistent_tmpdir_env_var() {
#[test]
fn test_empty_tmpdir_env_var() {
#[cfg(not(windows))]
#[cfg(not(any(windows, target_os = "android")))]
{
let result = new_ucmd!().env(TMPDIR, "").succeeds();
assert!(result.stdout_str().starts_with("/tmp"));
}
#[cfg(windows)]
#[cfg(any(windows, target_os = "android"))]
{
let result = new_ucmd!().env(TMPDIR, "").fails();
result.no_stdout();
@@ -885,13 +885,13 @@ fn test_empty_tmpdir_env_var() {
);
}
#[cfg(not(windows))]
#[cfg(not(any(windows, target_os = "android")))]
{
let result = new_ucmd!().env(TMPDIR, "").arg("-d").succeeds();
assert!(result.stdout_str().starts_with("/tmp"));
}
#[cfg(windows)]
#[cfg(any(windows, target_os = "android"))]
{
let result = new_ucmd!().env(TMPDIR, "").arg("-d").fails();
result.no_stdout();