File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
integration/vscode/ada/test/suite/general Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,17 @@ suite('which and envHasExec', function () {
29
29
suite ( 'findAdaMain' , function ( ) {
30
30
test ( 'Find one main (simple case)' , async function ( ) {
31
31
/* Test that findAdaMain works in a simple case */
32
- const uri = Uri . joinPath ( workspace . workspaceFolders ! [ 0 ] . uri , 'src' , 'main1.adb' ) ;
32
+ const folders = workspace . workspaceFolders ;
33
+ assert ( folders && folders . length > 0 ) ;
34
+ const uri = Uri . joinPath ( folders [ 0 ] . uri , 'src' , 'main1.adb' ) ;
33
35
const adaMain = await findAdaMain ( uri . fsPath ) ;
34
36
assert ( adaMain ) ;
35
37
} ) ;
36
38
test ( 'Find one main (case sensitivity)' , async function ( ) {
37
39
/* Test the behavior of findAdaMain with respect to case sensitivity */
38
- const uri_uppercase = Uri . joinPath ( workspace . workspaceFolders ! [ 0 ] . uri , 'src' , 'MAIN1.ADB' ) ;
40
+ const folders = workspace . workspaceFolders ;
41
+ assert ( folders && folders . length > 0 ) ;
42
+ const uri_uppercase = Uri . joinPath ( folders [ 0 ] . uri , 'src' , 'MAIN1.ADB' ) ;
39
43
const adaMain_from_uppercase = await findAdaMain ( uri_uppercase . fsPath ) ;
40
44
41
45
/* On Windows we should have a main here, otherwise we should not */
You can’t perform that action at this time.
0 commit comments