mirror of
https://github.com/openai/codex.git
synced 2026-03-05 21:45:28 +03:00
test(linux-sandbox): satisfy clippy bool assertions
This commit is contained in:
@@ -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(),
|
||||
]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user