fix: Windows path support and canonicalization (#13671)

Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
This commit is contained in:
Erik Demaine
2026-02-22 19:10:27 -05:00
committed by GitHub
parent ab75ef8140
commit 0042a07052
6 changed files with 28 additions and 17 deletions

View File

@@ -93,6 +93,13 @@ describe("tool.apply_patch freeform", () => {
expect(result.title).toContain("Success. Updated the following files")
expect(result.output).toContain("Success. Updated the following files")
// Strict formatting assertions for slashes
expect(result.output).toMatch(/A nested\/new\.txt/)
expect(result.output).toMatch(/D delete\.txt/)
expect(result.output).toMatch(/M modify\.txt/)
if (process.platform === "win32") {
expect(result.output).not.toContain("\\")
}
expect(result.metadata.diff).toContain("Index:")
expect(calls.length).toBe(1)