test(windows-sandbox): read deny fixtures by absolute path

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
viyatb-oai
2026-05-09 19:17:34 +00:00
parent d6b137a428
commit a16df7efc4

View File

@@ -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(),