From a16df7efc41e229abb6dc32c42d55731a00de79e Mon Sep 17 00:00:00 2001 From: viyatb-oai Date: Sat, 9 May 2026 19:17:34 +0000 Subject: [PATCH] test(windows-sandbox): read deny fixtures by absolute path Co-authored-by: Codex --- codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs b/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs index 0f1a748422..5a298b77c6 100644 --- a/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs +++ b/codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs @@ -189,6 +189,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { let fixture_dir = cwd.join(format!("legacy-non-tty-deny-read-fixture-{fixture_id}")); let _ = fs::remove_dir_all(&fixture_dir); let secret_path = fixture_dir.join("secret.env"); + let public_path = fixture_dir.join("public.txt"); fs::create_dir_all(&fixture_dir).expect("create deny-read fixture"); for (label, command) in [ @@ -228,7 +229,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"public.txt\" 2>&1".to_string(), + format!("type \"{}\" 2>&1", public_path.display()), ], fixture_dir.as_path(), HashMap::new(), @@ -261,7 +262,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"public.txt\" 2>&1".to_string(), + format!("type \"{}\" 2>&1", public_path.display()), ], fixture_dir.as_path(), HashMap::new(), @@ -287,7 +288,7 @@ fn legacy_non_tty_cmd_honors_deny_read_overrides() { vec![ "C:\\Windows\\System32\\cmd.exe".to_string(), "/c".to_string(), - "type \"secret.env\" 2>NUL".to_string(), + format!("type \"{}\" 2>NUL", secret_path.display()), ], fixture_dir.as_path(), HashMap::new(),