From 6695b5203bffda1c5a049a3ff761b47fa2a79602 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 9 Apr 2018 12:10:45 +0200 Subject: [PATCH] fix Unit Tests for Windows --- src/vs/workbench/parts/debug/node/debugAdapter.ts | 2 +- .../workbench/parts/debug/test/node/debugAdapter.test.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index e052878306b..f81f97f1819 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -375,7 +375,7 @@ export class DebugAdapter extends StreamDebugAdapter { // select the right platform let platformInfo: debug.IRawEnvAdapter; if (platform.isWindows && !process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432')) { - platformInfo = result.winx86; + platformInfo = result.winx86 || result.win || result.windows; } else if (platform.isWindows) { platformInfo = result.win || result.windows; } else if (platform.isMacintosh) { diff --git a/src/vs/workbench/parts/debug/test/node/debugAdapter.test.ts b/src/vs/workbench/parts/debug/test/node/debugAdapter.test.ts index da104aed02c..8a0379957c9 100644 --- a/src/vs/workbench/parts/debug/test/node/debugAdapter.test.ts +++ b/src/vs/workbench/parts/debug/test/node/debugAdapter.test.ts @@ -152,12 +152,10 @@ suite('Debug - Debugger', () => { }); test('merge platform specific attributes', () => { - - - const ae2 = DebugAdapter.platformAdapterExecutable([extensionDescriptor1, extensionDescriptor2], 'mock'); - assert.equal(ae2.command, platform.isLinux ? 'linuxRuntime' : (platform.isMacintosh ? 'osxRuntime' : 'winRuntime')); + const ae = DebugAdapter.platformAdapterExecutable([extensionDescriptor1, extensionDescriptor2], 'mock'); + assert.equal(ae.command, platform.isLinux ? 'linuxRuntime' : (platform.isMacintosh ? 'osxRuntime' : 'winRuntime')); const xprogram = platform.isLinux ? 'linuxProgram' : (platform.isMacintosh ? 'osxProgram' : 'winProgram'); - assert.deepEqual(ae2.args, ['rarg', '/e2/b/c/' + xprogram, 'parg']); + assert.deepEqual(ae.args, ['rarg', '/e2/b/c/' + xprogram, 'parg']); }); test('initial config file content', () => { -- GitLab