Skip to content

Commit 2b658ec

Browse files
committed
Merge branch 'topic/fix-win-testing' into 'master'
Fix testing issue on Windows See merge request eng/ide/ada_language_server!2095
2 parents 05684a3 + 1654fcb commit 2b658ec

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

integration/vscode/ada/test/general/highlighting.test.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,26 +274,27 @@ function testSyntax(syntaxPath: string, absFilePath: string, languageId: string)
274274
cmd.push('--updateSnapshot');
275275
}
276276

277-
const proc = spawnSync(cmd[0], cmd.slice(1), { cwd: workDirPath });
277+
const proc = spawnSync(cmd[0], cmd.slice(1), {
278+
cwd: workDirPath,
279+
encoding: 'utf-8',
280+
shell: process.platform == 'win32',
281+
});
278282

279283
if (proc.error) {
280284
// proc.error is set if we fail to spawn the child process
281285
throw proc.error;
282286
}
283287

284288
if (proc.status === null) {
285-
const msg =
286-
`Null return code for command: ${cmd.join(' ')}\n` +
287-
String(proc.stdout) +
288-
String(proc.stderr);
289+
const msg = `Null return code for command: ${cmd.join(' ')}\n` + proc.stdout + proc.stderr;
289290
assert.fail(msg);
290291
} else if (proc.status != 0) {
291292
const msg =
292293
`Return code ${proc.status.toString()} for command: cd ${workDirPath}; ${cmd.join(
293294
' ',
294295
)}\n` +
295-
String(proc.stdout) +
296-
String(proc.stderr);
296+
proc.stdout +
297+
proc.stderr;
297298
assert.fail(msg);
298299
}
299300
}

0 commit comments

Comments
 (0)