Skip to content

Commit 46f9aab

Browse files
committed
Add envMixin changes to tests
1 parent ead690e commit 46f9aab

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/vs/platform/terminal/test/node/terminalEnvironment.test.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ suite('platform - terminalEnvironment', () => {
3333
'-noexit',
3434
'-command',
3535
`. "${expectedPs1}"`
36-
]
36+
],
37+
envMixin: {
38+
VSCODE_INJECTION: '1'
39+
}
3740
});
3841
test('when undefined, []', () => {
3942
deepStrictEqual(getShellIntegrationInjection({ executable: pwshExe, args: [] }, enabledProcessOptions, logService), enabledExpectedResult);
@@ -61,7 +64,10 @@ suite('platform - terminalEnvironment', () => {
6164
'-noexit',
6265
'-command',
6366
`. "${expectedPs1}"`
64-
]
67+
],
68+
envMixin: {
69+
VSCODE_INJECTION: '1'
70+
}
6571
});
6672
test('when array contains no logo and login', () => {
6773
deepStrictEqual(getShellIntegrationInjection({ executable: pwshExe, args: ['-l', '-NoLogo'] }, enabledProcessOptions, logService), enabledExpectedResult);
@@ -97,8 +103,9 @@ suite('platform - terminalEnvironment', () => {
97103
/.+\/out\/vs\/workbench\/contrib\/terminal\/browser\/media\/shellIntegration-login.zsh/
98104
];
99105
function assertIsEnabled(result: IShellIntegrationConfigInjection) {
100-
strictEqual(Object.keys(result.envMixin!).length, 1);
106+
strictEqual(Object.keys(result.envMixin!).length, 2);
101107
ok(result.envMixin!['ZDOTDIR']?.match(expectedDir));
108+
ok(result.envMixin!['VSCODE_INJECTION']?.match('1'));
102109
strictEqual(result.filesToCopy?.length, 4);
103110
ok(result.filesToCopy[0].dest.match(expectedDests[0]));
104111
ok(result.filesToCopy[1].dest.match(expectedDests[1]));
@@ -143,7 +150,9 @@ suite('platform - terminalEnvironment', () => {
143150
'--init-file',
144151
`${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh`
145152
],
146-
envMixin: {}
153+
envMixin: {
154+
VSCODE_INJECTION: '1'
155+
}
147156
});
148157
deepStrictEqual(getShellIntegrationInjection({ executable: 'bash', args: [] }, enabledProcessOptions, logService), enabledExpectedResult);
149158
deepStrictEqual(getShellIntegrationInjection({ executable: 'bash', args: '' }, enabledProcessOptions, logService), enabledExpectedResult);
@@ -156,6 +165,7 @@ suite('platform - terminalEnvironment', () => {
156165
`${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh`
157166
],
158167
envMixin: {
168+
VSCODE_INJECTION: '1',
159169
VSCODE_SHELL_LOGIN: '1'
160170
}
161171
});

0 commit comments

Comments
 (0)