提交 672c31b1 编写于 作者: S SteVen Batten

fix getDefaultShell tests

refs #86958
上级 23d234d9
......@@ -213,7 +213,7 @@ suite('Workbench - TerminalEnvironment', () => {
test('should change Sysnative to System32 in non-WoW64 systems', () => {
const shell = getDefaultShell(key => {
return ({
'terminal.integrated.shell.windows': { user: 'C:\\Windows\\Sysnative\\cmd.exe', value: undefined, default: undefined }
'terminal.integrated.shell.windows': { userValue: 'C:\\Windows\\Sysnative\\cmd.exe', value: undefined, defaultValue: undefined }
} as any)[key];
}, false, 'DEFAULT', false, 'C:\\Windows', undefined, undefined, {} as any, false, platform.Platform.Windows);
assert.equal(shell, 'C:\\Windows\\System32\\cmd.exe');
......@@ -222,7 +222,7 @@ suite('Workbench - TerminalEnvironment', () => {
test('should not change Sysnative to System32 in WoW64 systems', () => {
const shell = getDefaultShell(key => {
return ({
'terminal.integrated.shell.windows': { user: 'C:\\Windows\\Sysnative\\cmd.exe', value: undefined, default: undefined }
'terminal.integrated.shell.windows': { userValue: 'C:\\Windows\\Sysnative\\cmd.exe', value: undefined, defaultValue: undefined }
} as any)[key];
}, false, 'DEFAULT', true, 'C:\\Windows', undefined, undefined, {} as any, false, platform.Platform.Windows);
assert.equal(shell, 'C:\\Windows\\Sysnative\\cmd.exe');
......@@ -231,22 +231,22 @@ suite('Workbench - TerminalEnvironment', () => {
test('should use automationShell when specified', () => {
const shell1 = getDefaultShell(key => {
return ({
'terminal.integrated.shell.windows': { user: 'shell', value: undefined, default: undefined },
'terminal.integrated.automationShell.windows': { user: undefined, value: undefined, default: undefined }
'terminal.integrated.shell.windows': { userValue: 'shell', value: undefined, defaultValue: undefined },
'terminal.integrated.automationShell.windows': { userValue: undefined, value: undefined, defaultValue: undefined }
} as any)[key];
}, false, 'DEFAULT', false, 'C:\\Windows', undefined, undefined, {} as any, false, platform.Platform.Windows);
assert.equal(shell1, 'shell', 'automationShell was false');
const shell2 = getDefaultShell(key => {
return ({
'terminal.integrated.shell.windows': { user: 'shell', value: undefined, default: undefined },
'terminal.integrated.automationShell.windows': { user: undefined, value: undefined, default: undefined }
'terminal.integrated.shell.windows': { userValue: 'shell', value: undefined, defaultValue: undefined },
'terminal.integrated.automationShell.windows': { userValue: undefined, value: undefined, defaultValue: undefined }
} as any)[key];
}, false, 'DEFAULT', false, 'C:\\Windows', undefined, undefined, {} as any, true, platform.Platform.Windows);
assert.equal(shell2, 'shell', 'automationShell was true');
const shell3 = getDefaultShell(key => {
return ({
'terminal.integrated.shell.windows': { user: 'shell', value: undefined, default: undefined },
'terminal.integrated.automationShell.windows': { user: 'automationShell', value: undefined, default: undefined }
'terminal.integrated.shell.windows': { userValue: 'shell', value: undefined, defaultValue: undefined },
'terminal.integrated.automationShell.windows': { userValue: 'automationShell', value: undefined, defaultValue: undefined }
} as any)[key];
}, false, 'DEFAULT', false, 'C:\\Windows', undefined, undefined, {} as any, true, platform.Platform.Windows);
assert.equal(shell3, 'automationShell', 'automationShell was true and specified in settings');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册