test(linux-sandbox): satisfy clippy bool assertions

This commit is contained in:
viyatb-oai
2026-03-02 20:54:28 -08:00
parent 5f6b43c929
commit 026cc2c86c

View File

@@ -160,26 +160,21 @@ fn valid_inner_stage_modes_do_not_panic() {
#[test]
fn codex_bwrap_cmdline_requires_argv0_marker() {
assert_eq!(
is_codex_bwrap_cmdline(&[
"bwrap".to_string(),
"--argv0".to_string(),
"codex-linux-sandbox".to_string(),
"--".to_string(),
"/path/to/codex-linux-sandbox".to_string(),
]),
true
);
assert_eq!(
is_codex_bwrap_cmdline(&["bwrap".to_string(), "--".to_string(), "/bin/sh".to_string(),]),
false
);
assert_eq!(
is_codex_bwrap_cmdline(&[
"bwrap".to_string(),
"--argv0".to_string(),
"bash".to_string(),
]),
false
);
assert!(is_codex_bwrap_cmdline(&[
"bwrap".to_string(),
"--argv0".to_string(),
"codex-linux-sandbox".to_string(),
"--".to_string(),
"/path/to/codex-linux-sandbox".to_string(),
]));
assert!(!is_codex_bwrap_cmdline(&[
"bwrap".to_string(),
"--".to_string(),
"/bin/sh".to_string(),
]));
assert!(!is_codex_bwrap_cmdline(&[
"bwrap".to_string(),
"--argv0".to_string(),
"bash".to_string(),
]));
}