Skip to content

Commit e2b078c

Browse files
update tests for feature
1 parent 63b50a3 commit e2b078c

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

codex-rs/core/src/shell.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ mod detect_shell_type_tests {
340340
#[cfg(unix)]
341341
mod tests {
342342
use super::*;
343-
use crate::powershell::UTF8_OUTPUT_PREFIX;
343+
344344
use std::path::PathBuf;
345345
use std::process::Command;
346346

@@ -462,15 +462,15 @@ mod tests {
462462
"pwsh.exe".to_string(),
463463
"-NoProfile".to_string(),
464464
"-Command".to_string(),
465-
format!("{UTF8_OUTPUT_PREFIX}echo hello"),
465+
format!("echo hello"),
466466
]
467467
);
468468
assert_eq!(
469469
test_powershell_shell.derive_exec_args("echo hello", true),
470470
vec![
471471
"pwsh.exe".to_string(),
472472
"-Command".to_string(),
473-
format!("{UTF8_OUTPUT_PREFIX}echo hello"),
473+
format!("echo hello"),
474474
]
475475
);
476476
}

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use anyhow::Result;
2+
use codex_core::features::Feature;
23
use core_test_support::assert_regex_match;
34
use core_test_support::responses::ev_assistant_message;
45
use core_test_support::responses::ev_completed;
@@ -231,7 +232,12 @@ async fn shell_command_times_out_with_timeout_ms() -> anyhow::Result<()> {
231232
async fn unicode_output(login: bool) -> anyhow::Result<()> {
232233
skip_if_no_network!(Ok(()));
233234

234-
let harness = shell_command_harness_with(|builder| builder.with_model("gpt-5.1")).await?;
235+
let harness = shell_command_harness_with(|builder| {
236+
builder.with_model("gpt-5.2").with_config(|config| {
237+
config.features.enable(Feature::PowershellUtf8);
238+
})
239+
})
240+
.await?;
235241

236242
let call_id = "unicode_output";
237243
mount_shell_responses(
@@ -255,7 +261,12 @@ async fn unicode_output(login: bool) -> anyhow::Result<()> {
255261
async fn unicode_output_with_newlines(login: bool) -> anyhow::Result<()> {
256262
skip_if_no_network!(Ok(()));
257263

258-
let harness = shell_command_harness_with(|builder| builder.with_model("gpt-5.1")).await?;
264+
let harness = shell_command_harness_with(|builder| {
265+
builder.with_model("gpt-5.2").with_config(|config| {
266+
config.features.enable(Feature::PowershellUtf8);
267+
})
268+
})
269+
.await?;
259270

260271
let call_id = "unicode_output";
261272
mount_shell_responses(

0 commit comments

Comments
 (0)