Skip to content

Commit e67b964

Browse files
test: allow prefixed powershell commands
1 parent 8d36271 commit e67b964

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codex-rs/core/tests/suite/user_shell_cmd.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ async fn user_shell_command_history_is_persisted_and_shared_with_model() -> anyh
155155
})
156156
.await;
157157
assert_eq!(begin_event.source, ExecCommandSource::UserShell);
158-
let matches_last_arg = begin_event.command.last() == Some(&command);
158+
let matches_last_arg = begin_event
159+
.command
160+
.last()
161+
.is_some_and(|last_arg| last_arg == &command || last_arg.ends_with(&command));
159162
let matches_split = shlex::split(&command).is_some_and(|split| split == begin_event.command);
160163
assert!(
161164
matches_last_arg || matches_split,

0 commit comments

Comments
 (0)