Skip to content

Commit 614b1f9

Browse files
steipeteYigtwxx
andauthored
test(agents): verify Windows filename case end to end
Co-authored-by: Yigtwxx <[email protected]>
1 parent 1b21827 commit 614b1f9

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/agents/agent-tools.workspace-paths.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,28 @@ describe("workspace path resolution", () => {
118118
});
119119
});
120120

121+
it.runIf(process.platform === "win32")(
122+
"preserves mixed-case and Unicode names for workspace-only writes on Windows",
123+
async () => {
124+
await withTempDir("openclaw-windows-case-", async (workspaceDir) => {
125+
const cfg: OpenClawConfig = { tools: { fs: { workspaceOnly: true } } };
126+
const tools = createOpenClawCodingTools({ workspaceDir, config: cfg });
127+
const { writeTool } = expectReadWriteEditTools(tools);
128+
129+
await writeTool.execute("windows-case-write", {
130+
path: "Source/İstanbul/Widget.ts",
131+
content: "export const Widget = true;",
132+
});
133+
134+
await expect(fs.readdir(workspaceDir)).resolves.toEqual(["Source"]);
135+
await expect(fs.readdir(path.join(workspaceDir, "Source"))).resolves.toEqual(["İstanbul"]);
136+
await expect(
137+
fs.readdir(path.join(workspaceDir, "Source", "İstanbul")),
138+
).resolves.toEqual(["Widget.ts"]);
139+
});
140+
},
141+
);
142+
121143
it("allows deletion edits with empty newText", async () => {
122144
await withTempDir("openclaw-ws-", async (workspaceDir) => {
123145
await withTempDir("openclaw-cwd-", async (otherDir) => {

0 commit comments

Comments
 (0)