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); }