From c479bff448ca06418a686a566c3f1b28208c3f13 Mon Sep 17 00:00:00 2001 From: pash Date: Thu, 29 Jan 2026 01:23:13 -0800 Subject: [PATCH] fix workspace context test path on windows --- codex-rs/core/src/environment_context.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/codex-rs/core/src/environment_context.rs b/codex-rs/core/src/environment_context.rs index 4e2a714833..e57f8461aa 100644 --- a/codex-rs/core/src/environment_context.rs +++ b/codex-rs/core/src/environment_context.rs @@ -267,9 +267,10 @@ mod tests { #[test] fn serialize_environment_context_with_workspace_configuration() { let cwd = test_path_buf("/repo"); + let cwd_str = cwd.to_string_lossy().to_string(); let mut workspaces = BTreeMap::new(); workspaces.insert( - cwd.to_string_lossy().to_string(), + cwd_str.clone(), WorkspaceEntry { associated_remote_urls: Some(BTreeMap::from([( "origin".to_string(), @@ -282,18 +283,20 @@ mod tests { let context = EnvironmentContext::new(Some(cwd), fake_shell(), Some(workspace_configuration)); - let expected = r#" - /repo + let expected = format!( + r#" + {cwd_str} bash - + abc123 https://example.com/repo.git -"#; +"# + ); assert_eq!(context.serialize_to_xml(), expected); }