mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
fix windows line endings
This commit is contained in:
@@ -407,6 +407,14 @@ mod tests {
|
||||
const TRUNCATED_STRUCTURED_EXPECTED: &str =
|
||||
include_str!("tests/truncated_structured_expected.txt");
|
||||
|
||||
fn normalize_line_endings(input: &str) -> String {
|
||||
if input.contains('\r') {
|
||||
input.replace('\r', "")
|
||||
} else {
|
||||
input.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
fn sample_output() -> ExecToolCallOutput {
|
||||
ExecToolCallOutput {
|
||||
exit_code: 0,
|
||||
@@ -480,6 +488,7 @@ mod tests {
|
||||
output.aggregated_output = StreamOutput::new(aggregated);
|
||||
|
||||
let formatted = format_exec_output(&output, ExecResponseFormat::StructuredText);
|
||||
assert_eq!(formatted, TRUNCATED_STRUCTURED_EXPECTED);
|
||||
let expected = normalize_line_endings(TRUNCATED_STRUCTURED_EXPECTED);
|
||||
assert_eq!(formatted, expected);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user