@@ -22,7 +22,7 @@ def join_path(path: str) -> str:
22
22
23
23
24
24
PATH_MAIN_GO = join_path ("data/sample-go/main.go" )
25
- print ( PATH_MAIN_GO )
25
+ PATH_OTHER_GO = join_path ( "data/sample-go/other.go" )
26
26
27
27
28
28
def assertRetry (predicate , retry_max = 100 ):
@@ -161,13 +161,14 @@ def test_workspace_symbol(nvim):
161
161
162
162
163
163
def test_textDocument_references (nvim ):
164
+ nvim .command ("edit! {}" .format (PATH_OTHER_GO ))
164
165
nvim .command ("edit! {}" .format (PATH_MAIN_GO ))
165
166
time .sleep (1 )
166
167
nvim .funcs .cursor (13 , 6 )
167
168
nvim .funcs .LanguageClient_textDocument_references ()
168
- time .sleep (3 )
169
+ time .sleep (1 )
169
170
expect = ["func greet() int32 {" , "log.Println(greet())" ,
170
- "log .Println(greet())" ]
171
+ "fmt .Println(greet())" ]
171
172
172
173
assert [location ["text" ]
173
174
for location in nvim .funcs .getloclist (0 )] == expect
@@ -214,26 +215,6 @@ def test_languageClient_registerHandlers(nvim):
214
215
assert nvim .vars ['responses' ][0 ]['result' ] is None
215
216
216
217
217
- # def test_languageClient_textDocument_codeAction(nvim):
218
- # nvim.command("edit {}".format(PATH_CODEACTION))
219
- # nvim.funcs.cursor(4, 14)
220
- # assertRetry(lambda: len(nvim.funcs.getqflist()) == 1)
221
-
222
- # nvim.funcs.LanguageClient_textDocument_codeAction()
223
- # # Wait for fzf window showup.
224
- # assertRetry(lambda:
225
- # next((b for b in nvim.buffers
226
- # if b.name.startswith('term://')), None) is not None)
227
- # time.sleep(0.2)
228
- # nvim.eval('feedkeys("\<CR>")')
229
- # # Wait for fzf window dismiss.
230
- # assertRetry(lambda:
231
- # next((b for b in nvim.buffers
232
- # if b.name.startswith('term://')), None) is None)
233
-
234
- # assertRetry(lambda: len(nvim.funcs.getqflist()) == 0)
235
-
236
-
237
218
def _open_float_window (nvim ):
238
219
nvim .funcs .cursor (10 , 15 )
239
220
pos = nvim .funcs .getpos ('.' )
0 commit comments