Skip to content

Commit

Permalink
fix: adjust test
Browse files Browse the repository at this point in the history
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
  • Loading branch information
Shane-XB-Qian committed Aug 31, 2024
1 parent 736c83d commit a94ecd3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions test/clangd_tests.vim
Original file line number Diff line number Diff line change
Expand Up @@ -901,10 +901,18 @@ def g:Test_LspSelection()
assert_equal([4, 30, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
cursor(5, 8)
normal vlelelelelelsy
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
if clangdVerMajor > 14
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
else
assert_equal([4, 30, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
endif
cursor(5, 8)
normal vlelelelelelelsy
assert_equal([2, 1, 8, 1], [line("'<"), col("'<"), line("'>"), col("'>")])
if clangdVerMajor > 14
assert_equal([4, 5, 6, 5], [line("'<"), col("'<"), line("'>"), col("'>")])
else
assert_equal([2, 1, 8, 1], [line("'<"), col("'<"), line("'>"), col("'>")])
endif

xunmap le
xunmap ls
Expand Down
2 changes: 1 addition & 1 deletion test/common.vim
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ endfunc
def g:WaitForDiags(errCount: number)
var retries = 0
while retries < 200
:sleep 150m
var d = lsp#lsp#ErrorCount()
if d.Error == errCount
break
endif
retries += 1
:sleep 150m
endwhile

assert_equal(errCount, lsp#lsp#ErrorCount().Error)
Expand Down

0 comments on commit a94ecd3

Please sign in to comment.