Files
penguin-harness/packages/core/test/model-visible-path.test.ts
T
Jingzhe Xu a798bca87f feat(core): recover truncated tool output via the Session scratchpad (#145)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 13:17:42 +08:00

23 lines
826 B
TypeScript

import { describe, expect, it } from "vitest";
import { modelVisiblePath } from "../src/internal/model-visible-path.js";
describe("modelVisiblePath", () => {
it.skipIf(process.platform === "win32")(
"passes POSIX paths through, including backslash filename characters",
() => {
expect(modelVisiblePath("/tmp/a path/report.log")).toBe("/tmp/a path/report.log");
expect(modelVisiblePath("/tmp/we\\ird.log")).toBe("/tmp/we\\ird.log");
},
);
it.skipIf(process.platform !== "win32")(
"spells ordinary Windows and UNC paths with forward slashes",
() => {
expect(modelVisiblePath("C:\\Users\\x\\a path\\report.log")).toBe(
"C:/Users/x/a path/report.log",
);
expect(modelVisiblePath("\\\\server\\share\\report.log")).toBe("//server/share/report.log");
},
);
});