Skip to content

Commit a94ecd3

Browse files
committed
fix: adjust test
Signed-off-by: shane.xb.qian <[email protected]>
1 parent 736c83d commit a94ecd3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

test/clangd_tests.vim

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,10 +901,18 @@ def g:Test_LspSelection()
901901
assert_equal([4, 30, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
902902
cursor(5, 8)
903903
normal vlelelelelelsy
904-
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
904+
if clangdVerMajor > 14
905+
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
906+
else
907+
assert_equal([4, 30, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
908+
endif
905909
cursor(5, 8)
906910
normal vlelelelelelelsy
907-
assert_equal([2, 1, 8, 1], [line("'<"), col("'<"), line("'>"), col("'>")])
911+
if clangdVerMajor > 14
912+
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
913+
else
914+
assert_equal([2, 1, 8, 1], [line("'<"), col("'<"), line("'>"), col("'>")])
915+
endif
908916

909917
xunmap le
910918
xunmap ls

test/common.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ endfunc
105105
def g:WaitForDiags(errCount: number)
106106
var retries = 0
107107
while retries < 200
108+
:sleep 150m
108109
var d = lsp#lsp#ErrorCount()
109110
if d.Error == errCount
110111
break
111112
endif
112113
retries += 1
113-
:sleep 150m
114114
endwhile
115115

116116
assert_equal(errCount, lsp#lsp#ErrorCount().Error)

0 commit comments

Comments
 (0)