tf_code/packages/tfcode/test/lsp/launch.test.ts
Gab a8b73fd754 refactor: apply minimal tfcode branding
- Rename packages/opencode → packages/tfcode (directory only)
- Rename bin/opencode → bin/tfcode (CLI binary)
- Rename .opencode → .tfcode (config directory)
- Update package.json name and bin field
- Update config directory path references (.tfcode)
- Keep internal code references as 'opencode' for easy upstream sync
- Keep @opencode-ai/* workspace package names

This minimal branding approach allows clean merges from upstream
opencode repository while providing tfcode branding for users.
2026-03-24 13:20:14 +11:00

23 lines
692 B
TypeScript

import { describe, expect, test } from "bun:test"
import fs from "fs/promises"
import path from "path"
import { spawn } from "../../src/lsp/launch"
import { tmpdir } from "../fixture/fixture"
describe("lsp.launch", () => {
test("spawns cmd scripts with spaces on Windows", async () => {
if (process.platform !== "win32") return
await using tmp = await tmpdir()
const dir = path.join(tmp.path, "with space")
const file = path.join(dir, "echo cmd.cmd")
await fs.mkdir(dir, { recursive: true })
await Bun.write(file, "@echo off\r\nif %~1==--stdio exit /b 0\r\nexit /b 7\r\n")
const proc = spawn(file, ["--stdio"])
expect(await proc.exited).toBe(0)
})
})