@@ -33,7 +33,10 @@ suite('platform - terminalEnvironment', () => {
33
33
'-noexit' ,
34
34
'-command' ,
35
35
`. "${ expectedPs1 } "`
36
- ]
36
+ ] ,
37
+ envMixin : {
38
+ VSCODE_INJECTION : '1'
39
+ }
37
40
} ) ;
38
41
test ( 'when undefined, []' , ( ) => {
39
42
deepStrictEqual ( getShellIntegrationInjection ( { executable : pwshExe , args : [ ] } , enabledProcessOptions , logService ) , enabledExpectedResult ) ;
@@ -61,7 +64,10 @@ suite('platform - terminalEnvironment', () => {
61
64
'-noexit' ,
62
65
'-command' ,
63
66
`. "${ expectedPs1 } "`
64
- ]
67
+ ] ,
68
+ envMixin : {
69
+ VSCODE_INJECTION : '1'
70
+ }
65
71
} ) ;
66
72
test ( 'when array contains no logo and login' , ( ) => {
67
73
deepStrictEqual ( getShellIntegrationInjection ( { executable : pwshExe , args : [ '-l' , '-NoLogo' ] } , enabledProcessOptions , logService ) , enabledExpectedResult ) ;
@@ -97,8 +103,9 @@ suite('platform - terminalEnvironment', () => {
97
103
/ .+ \/ o u t \/ v s \/ w o r k b e n c h \/ c o n t r i b \/ t e r m i n a l \/ b r o w s e r \/ m e d i a \/ s h e l l I n t e g r a t i o n - l o g i n .z s h /
98
104
] ;
99
105
function assertIsEnabled ( result : IShellIntegrationConfigInjection ) {
100
- strictEqual ( Object . keys ( result . envMixin ! ) . length , 1 ) ;
106
+ strictEqual ( Object . keys ( result . envMixin ! ) . length , 2 ) ;
101
107
ok ( result . envMixin ! [ 'ZDOTDIR' ] ?. match ( expectedDir ) ) ;
108
+ ok ( result . envMixin ! [ 'VSCODE_INJECTION' ] ?. match ( '1' ) ) ;
102
109
strictEqual ( result . filesToCopy ?. length , 4 ) ;
103
110
ok ( result . filesToCopy [ 0 ] . dest . match ( expectedDests [ 0 ] ) ) ;
104
111
ok ( result . filesToCopy [ 1 ] . dest . match ( expectedDests [ 1 ] ) ) ;
@@ -143,7 +150,9 @@ suite('platform - terminalEnvironment', () => {
143
150
'--init-file' ,
144
151
`${ repoRoot } /out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh`
145
152
] ,
146
- envMixin : { }
153
+ envMixin : {
154
+ VSCODE_INJECTION : '1'
155
+ }
147
156
} ) ;
148
157
deepStrictEqual ( getShellIntegrationInjection ( { executable : 'bash' , args : [ ] } , enabledProcessOptions , logService ) , enabledExpectedResult ) ;
149
158
deepStrictEqual ( getShellIntegrationInjection ( { executable : 'bash' , args : '' } , enabledProcessOptions , logService ) , enabledExpectedResult ) ;
@@ -156,6 +165,7 @@ suite('platform - terminalEnvironment', () => {
156
165
`${ repoRoot } /out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh`
157
166
] ,
158
167
envMixin : {
168
+ VSCODE_INJECTION : '1' ,
159
169
VSCODE_SHELL_LOGIN : '1'
160
170
}
161
171
} ) ;
0 commit comments