@@ -81,7 +81,7 @@ describe("grainlsp", ({test, testSkip}) => {
81
81
"goto_definition1" ,
82
82
"file:///a.gr" ,
83
83
{| module A
84
- let func = x => x
84
+ let func = x => print(x)
85
85
func(1)
86
86
|} ,
87
87
lsp_input(
@@ -99,7 +99,7 @@ func(1)
99
99
"goto_definition2" ,
100
100
"file:///a.gr" ,
101
101
{| module A
102
- let func = x => x
102
+ let func = x => print(x)
103
103
func(1)
104
104
|} ,
105
105
lsp_input(
@@ -118,15 +118,15 @@ func(1)
118
118
make_test_utils_uri("a.gr" ),
119
119
{| module A
120
120
from "./provideAll.gr" include ProvideAll
121
- ProvideAll.y(1)
121
+ ignore( ProvideAll.y(1) )
122
122
|} ,
123
123
lsp_input(
124
124
"textDocument/definition" ,
125
- lsp_text_document_position(make_test_utils_uri("a.gr" ), 2 , 11 ),
125
+ lsp_text_document_position(make_test_utils_uri("a.gr" ), 2 , 18 ),
126
126
),
127
127
lsp_location_link(
128
128
make_test_utils_uri("provideAll.gr" ),
129
- ((2 , 0 ), (2 , 12 )),
129
+ ((2 , 7 ), (2 , 19 )),
130
130
((3 , 12 ), (3 , 13 )),
131
131
),
132
132
);
@@ -269,7 +269,7 @@ let abc: T = { x: 1 }
269
269
"code_action_add_function_label1" ,
270
270
"file:///a.gr" ,
271
271
{| module A
272
- let f = (x, y, z) => x ++ y ++ z
272
+ let f = (x, y, z) => print( x ++ y ++ z)
273
273
f("y", x="x", "z")
274
274
|} ,
275
275
lsp_input(
@@ -300,7 +300,7 @@ f("y", x="x", "z")
300
300
"code_action_add_function_label2" ,
301
301
"file:///a.gr" ,
302
302
{| module A
303
- let f = (x, y, z) => x ++ y ++ z
303
+ let f = (x, y, z) => print( x ++ y ++ z)
304
304
f("y", x="x", "z")
305
305
|} ,
306
306
lsp_input(
@@ -331,7 +331,7 @@ f("y", x="x", "z")
331
331
"code_action_add_function_label3" ,
332
332
"file:///a.gr" ,
333
333
{| module A
334
- let f = (x) => x
334
+ let f = (x) => print(x)
335
335
f(x="x")
336
336
|} ,
337
337
lsp_input(
@@ -506,7 +506,7 @@ from "./provideAll.gr" include ProvideAll
506
506
record T { x: Number }
507
507
let a = 1
508
508
let b = 2 and c = 3
509
- "abc"
509
+ print( "abc")
510
510
|} ,
511
511
lsp_input(
512
512
"textDocument/codeLens" ,
@@ -549,10 +549,7 @@ let b = 2 and c = 3
549
549
("range" , lsp_range((4 , 1 ), (4 , 1 ))),
550
550
(
551
551
"command" ,
552
- ` Assoc ([
553
- ("title" , ` String ("String" )),
554
- ("command" , ` String ("" )),
555
- ] ),
552
+ ` Assoc ([ ("title" , ` String ("Void" )), ("command" , ` String ("" ))] ),
556
553
),
557
554
] ),
558
555
] ),
0 commit comments