@@ -29,12 +29,21 @@ def check_return(result_array, checks):
29
29
root_dir = os .path .join (test_dir , "pp" )
30
30
string = write_rpc_request (1 , "initialize" , {"rootPath" : root_dir })
31
31
file_path = os .path .join (test_dir , "pp" , "preproc.F90" )
32
- string += hover_req (file_path , 5 , 8 )
33
- string += hover_req (file_path , 7 , 30 )
32
+ string += hover_req (file_path , 5 , 8 ) # user defined type
33
+ string += hover_req (file_path , 7 , 30 ) # variable
34
+ string += hover_req (file_path , 7 , 40 ) # multi-lin variable
35
+ string += hover_req (file_path , 8 , 7 ) # function with if conditional
36
+ string += hover_req (file_path , 9 , 7 ) # multiline function with if conditional
34
37
errcode , results = run_request (string , f" --config={ root_dir } /.pp_conf.json" )
35
38
assert errcode == 0
36
39
37
40
# Reference solution
38
- ref_results = ("#define PCType character*(80)" , "#define PETSC_ERR_INT_OVERFLOW 84" )
41
+ ref_results = (
42
+ "#define PCType character*(80)" ,
43
+ "#define PETSC_ERR_INT_OVERFLOW 84" ,
44
+ "#define varVar 55" ,
45
+ "#define ewrite if (priority <= 3) write((priority), format)" ,
46
+ "#define ewrite2 if (priority <= 3) write((priority), format)" ,
47
+ )
39
48
assert len (ref_results ) == len (results ) - 1
40
49
check_return (results [1 :], ref_results )
0 commit comments