From 463efecf6ddcea31efada01ddd8a7695604ab80f Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 14:59:00 +0000 Subject: fix(plugin): escape typographic single quotes for PowerShell PowerShell treats U+2018 to U+201B as single quotes too, so a path containing one ended the quoted string early. Double them like '. Co-Authored-By: Claude Opus 5.5 --- plugin/test/runner.test.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugin/test/runner.test.js') diff --git a/plugin/test/runner.test.js b/plugin/test/runner.test.js index a22d103..c795b85 100644 --- a/plugin/test/runner.test.js +++ b/plugin/test/runner.test.js @@ -12,6 +12,8 @@ test('commands quote paths and only run after changing directory', () => { 'cd /d "D:\\My Files" && "C:\\My Tools\\cpsc.exe" "D:\\My Files\\test.cps" -r'); assert.equal(buildRunCommand('C:\\My Tools\\cpsc.exe', "D:\\Pat's Files\\test.cps", "D:\\Pat's Files", 'powershell'), "Set-Location -LiteralPath 'D:\\Pat''s Files'; if ($?) { & 'C:\\My Tools\\cpsc.exe' 'D:\\Pat''s Files\\test.cps' -r }"); + assert.equal(buildRunCommand('cpsc', 'Pat\u2019s \u2018x\u201B.cps', '.', 'powershell'), + "Set-Location -LiteralPath '.'; if ($?) { & 'cpsc' 'Pat\u2019\u2019s \u2018\u2018x\u201B\u201B.cps' -r }"); assert.throws(() => buildRunCommand('cpsc\nother', 'test.cps', '.', 'posix'), /line breaks/); if (process.platform !== 'win32') { const file = "/tmp/Pat's file $(echo unexpected) `echo unexpected`.cps"; -- cgit v1.3.1-4-g156e