This commit is contained in:
ZacharyZhang-NY committed 2026-04-04 12:03:50 -04:00
1 parent 66158e222e
commit 67c757f481
314 files changed
+37945 -22962

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { describe, expect, it } from "vitest";
import { normalizeCommandValue } from "@agentcompany/adapter-utils/server-utils";
import { commandLooksLike } from "@agentcompany/adapter-utils/test-utils";
describe("command path normalization", () => {
it("removes surrounding quotes from absolute executable paths", () => {
expect(normalizeCommandValue('"C:\\Users\\First Last\\AppData\\Local\\bin\\claude.exe"')).toBe(
"C:\\Users\\First Last\\AppData\\Local\\bin\\claude.exe",
);
expect(normalizeCommandValue("'C:\\Users\\First Last\\AppData\\Local\\bin\\claude.exe'")).toBe(
"C:\\Users\\First Last\\AppData\\Local\\bin\\claude.exe",
);
});
it("keeps bare commands unchanged", () => {
expect(normalizeCommandValue("claude")).toBe("claude");
expect(normalizeCommandValue("codex")).toBe("codex");
});
it("matches quoted commands against connector executables", () => {
expect(commandLooksLike('"C:\\Users\\First Last\\AppData\\Local\\bin\\claude.exe"', "claude")).toBe(true);
expect(commandLooksLike("'C:\\Users\\First Last\\AppData\\Local\\bin\\codex.exe'", "codex")).toBe(true);
});
});