Files
scriptc/packages/compiler/test/ts7/program.test.ts
Chris TateandKhaled Ghallab d7b5891b4f Fix scriptc run on Windows
- Normalize Windows paths passed through the TS7 virtual filesystem.
- Emit and launch .exe outputs by default on Windows.
- Add targeted regressions and a Windows GitHub Actions smoke test.

Co-authored-by: Khaled Ghallab <171967089+Khaled-Ghallab@users.noreply.github.com>
2026-07-26 15:50:38 -05:00

17 lines
688 B
TypeScript

import { describe, expect, test } from "vitest";
import { tsgoPath } from "../../src/frontend/shared.js";
describe("tsgo virtual filesystem paths", () => {
test("matches slash-normalized Windows callback paths", () => {
expect(tsgoPath("C:\\Users\\Alice\\project\\tsconfig.json", "win32"))
.toBe("C:/Users/Alice/project/tsconfig.json");
expect(tsgoPath("C:/Users/Alice/project/tsconfig.json", "win32"))
.toBe("C:/Users/Alice/project/tsconfig.json");
});
test("preserves backslashes that are literal POSIX filename characters", () => {
expect(tsgoPath("/tmp/project\\name/tsconfig.json", "linux"))
.toBe("/tmp/project\\name/tsconfig.json");
});
});