@@ -75,12 +75,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
75
75
instance ( mockToolchain ) ,
76
76
instance ( mockOutputChannel )
77
77
) ;
78
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
79
- name : "Test Launch Config" ,
80
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
81
- request : "launch" ,
82
- program : "${workspaceFolder}/.build/debug/executable" ,
83
- } ) ;
78
+ const launchConfig =
79
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
80
+ name : "Test Launch Config" ,
81
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
82
+ request : "launch" ,
83
+ program : "${workspaceFolder}/.build/debug/executable" ,
84
+ } ) ;
84
85
expect ( launchConfig ) . to . containSubset ( { type : LaunchConfigType . CODE_LLDB } ) ;
85
86
} ) ;
86
87
@@ -93,7 +94,7 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
93
94
instance ( mockOutputChannel )
94
95
) ;
95
96
await expect (
96
- configProvider . resolveDebugConfiguration ( undefined , {
97
+ configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
97
98
name : "Test Launch Config" ,
98
99
type : SWIFT_LAUNCH_CONFIG_TYPE ,
99
100
request : "launch" ,
@@ -115,7 +116,7 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
115
116
instance ( mockOutputChannel )
116
117
) ;
117
118
await expect (
118
- configProvider . resolveDebugConfiguration ( undefined , {
119
+ configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
119
120
name : "Test Launch Config" ,
120
121
type : SWIFT_LAUNCH_CONFIG_TYPE ,
121
122
request : "launch" ,
@@ -138,7 +139,7 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
138
139
instance ( mockOutputChannel )
139
140
) ;
140
141
await expect (
141
- configProvider . resolveDebugConfiguration ( undefined , {
142
+ configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
142
143
name : "Test Launch Config" ,
143
144
type : SWIFT_LAUNCH_CONFIG_TYPE ,
144
145
request : "launch" ,
@@ -172,12 +173,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
172
173
instance ( mockToolchain ) ,
173
174
instance ( mockOutputChannel )
174
175
) ;
175
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
176
- name : "Test Launch Config" ,
177
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
178
- request : "launch" ,
179
- program : "${workspaceFolder}/.build/debug/executable" ,
180
- } ) ;
176
+ const launchConfig =
177
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
178
+ name : "Test Launch Config" ,
179
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
180
+ request : "launch" ,
181
+ program : "${workspaceFolder}/.build/debug/executable" ,
182
+ } ) ;
181
183
expect ( launchConfig ) . to . containSubset ( {
182
184
type : LaunchConfigType . LLDB_DAP ,
183
185
debugAdapterExecutable : "/path/to/lldb-dap" ,
@@ -192,7 +194,7 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
192
194
instance ( mockOutputChannel )
193
195
) ;
194
196
await expect (
195
- configProvider . resolveDebugConfiguration ( undefined , {
197
+ configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
196
198
name : "Test Launch Config" ,
197
199
type : SWIFT_LAUNCH_CONFIG_TYPE ,
198
200
request : "launch" ,
@@ -208,12 +210,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
208
210
instance ( mockToolchain ) ,
209
211
instance ( mockOutputChannel )
210
212
) ;
211
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
212
- name : "Test Launch Config" ,
213
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
214
- request : "launch" ,
215
- program : "${workspaceFolder}/.build/debug/executable" ,
216
- } ) ;
213
+ const launchConfig =
214
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
215
+ name : "Test Launch Config" ,
216
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
217
+ request : "launch" ,
218
+ program : "${workspaceFolder}/.build/debug/executable" ,
219
+ } ) ;
217
220
expect ( launchConfig ) . to . containSubset ( {
218
221
program : "${workspaceFolder}/.build/debug/executable.exe" ,
219
222
} ) ;
@@ -225,12 +228,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
225
228
instance ( mockToolchain ) ,
226
229
instance ( mockOutputChannel )
227
230
) ;
228
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
229
- name : "Test Launch Config" ,
230
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
231
- request : "launch" ,
232
- program : "${workspaceFolder}/.build/debug/executable.exe" ,
233
- } ) ;
231
+ const launchConfig =
232
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
233
+ name : "Test Launch Config" ,
234
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
235
+ request : "launch" ,
236
+ program : "${workspaceFolder}/.build/debug/executable.exe" ,
237
+ } ) ;
234
238
expect ( launchConfig ) . to . containSubset ( {
235
239
program : "${workspaceFolder}/.build/debug/executable.exe" ,
236
240
} ) ;
@@ -242,12 +246,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
242
246
instance ( mockToolchain ) ,
243
247
instance ( mockOutputChannel )
244
248
) ;
245
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
246
- name : "Test Launch Config" ,
247
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
248
- request : "launch" ,
249
- program : "${workspaceFolder}/.build/debug/executable" ,
250
- } ) ;
249
+ const launchConfig =
250
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
251
+ name : "Test Launch Config" ,
252
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
253
+ request : "launch" ,
254
+ program : "${workspaceFolder}/.build/debug/executable" ,
255
+ } ) ;
251
256
expect ( launchConfig ) . to . containSubset ( {
252
257
program : "${workspaceFolder}/.build/debug/executable" ,
253
258
} ) ;
@@ -259,12 +264,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
259
264
instance ( mockToolchain ) ,
260
265
instance ( mockOutputChannel )
261
266
) ;
262
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
263
- name : "Test Launch Config" ,
264
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
265
- request : "launch" ,
266
- program : "${workspaceFolder}/.build/debug/executable" ,
267
- } ) ;
267
+ const launchConfig =
268
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
269
+ name : "Test Launch Config" ,
270
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
271
+ request : "launch" ,
272
+ program : "${workspaceFolder}/.build/debug/executable" ,
273
+ } ) ;
268
274
expect ( launchConfig ) . to . containSubset ( {
269
275
program : "${workspaceFolder}/.build/debug/executable" ,
270
276
} ) ;
@@ -276,16 +282,17 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
276
282
instance ( mockToolchain ) ,
277
283
instance ( mockOutputChannel )
278
284
) ;
279
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
280
- name : "Test Launch Config" ,
281
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
282
- request : "launch" ,
283
- program : "${workspaceFolder}/.build/debug/executable" ,
284
- env : {
285
- VAR1 : "value1" ,
286
- VAR2 : "value2" ,
287
- } ,
288
- } ) ;
285
+ const launchConfig =
286
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
287
+ name : "Test Launch Config" ,
288
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
289
+ request : "launch" ,
290
+ program : "${workspaceFolder}/.build/debug/executable" ,
291
+ env : {
292
+ VAR1 : "value1" ,
293
+ VAR2 : "value2" ,
294
+ } ,
295
+ } ) ;
289
296
expect ( launchConfig )
290
297
. to . have . property ( "env" )
291
298
. that . deep . equals ( [ "VAR1=value1" , "VAR2=value2" ] ) ;
@@ -297,12 +304,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
297
304
instance ( mockToolchain ) ,
298
305
instance ( mockOutputChannel )
299
306
) ;
300
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
301
- name : "Test Launch Config" ,
302
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
303
- request : "launch" ,
304
- program : "${workspaceFolder}/.build/debug/executable" ,
305
- } ) ;
307
+ const launchConfig =
308
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
309
+ name : "Test Launch Config" ,
310
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
311
+ request : "launch" ,
312
+ program : "${workspaceFolder}/.build/debug/executable" ,
313
+ } ) ;
306
314
expect ( launchConfig ) . to . not . have . property ( "env" ) ;
307
315
} ) ;
308
316
@@ -312,12 +320,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
312
320
instance ( mockToolchain ) ,
313
321
instance ( mockOutputChannel )
314
322
) ;
315
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
316
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
317
- request : "launch" ,
318
- name : "Test Launch" ,
319
- env : { } ,
320
- } ) ;
323
+ const launchConfig =
324
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
325
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
326
+ request : "launch" ,
327
+ name : "Test Launch" ,
328
+ env : { } ,
329
+ } ) ;
321
330
322
331
expect ( launchConfig ) . to . have . property ( "env" ) . that . deep . equals ( [ ] ) ;
323
332
} ) ;
@@ -333,12 +342,13 @@ suite("LLDBDebugConfigurationProvider Tests", () => {
333
342
instance ( mockToolchain ) ,
334
343
instance ( mockOutputChannel )
335
344
) ;
336
- const launchConfig = await configProvider . resolveDebugConfiguration ( undefined , {
337
- type : SWIFT_LAUNCH_CONFIG_TYPE ,
338
- request : "launch" ,
339
- name : "Test Launch" ,
340
- env,
341
- } ) ;
345
+ const launchConfig =
346
+ await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , {
347
+ type : SWIFT_LAUNCH_CONFIG_TYPE ,
348
+ request : "launch" ,
349
+ name : "Test Launch" ,
350
+ env,
351
+ } ) ;
342
352
343
353
// Verify that all 1000 environment variables are properly converted
344
354
const expectedEnv = Array . from ( { length : 1000 } , ( _ , i ) => `VAR${ i } =value${ i } ` ) ;
0 commit comments