1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
Description: Support different clangd versions in tests
Upstream always blesses and embeds a specific LLVM version and hence
clangd release and adapts their tests accordingly. While we could do
similar requiring a specific clangd version I prefer using whatever
is the default in Debian currently, which means we are sometimes ahead
or behind and usually both.
.
For upstream the changes are at best not-needed, but at times I take
a shortcut and relax the tests which for upstream isn't appropriate,
but for us it should be good enough for the time being.
.
An example being the CheckPopupPosition change (the only current one)
as technically only one position is correct and changing it would be
incorrect/a regression, but given the constraint is still very narrow
I picked this solution for now.
Author: David Kalnischkies <donkult@debian.org>
Forwarded: not-needed
--- a/test/lib/autoload/youcompleteme/test/popup.vim
+++ b/test/lib/autoload/youcompleteme/test/popup.vim
@@ -16,9 +16,15 @@
\ . ' in: '
\ . string( actual_pos ) )
else
- let ret += assert_equal( a:pos[ c ],
+ if type(a:pos[ c ]) == 3
+ let ret += assert_inrange( a:pos[ c ][0], a:pos[ c ][1],
\ actual_pos[ c ],
\ c . ' in: ' . string( actual_pos ) )
+ else
+ let ret += assert_equal( a:pos[ c ],
+ \ actual_pos[ c ],
+ \ c . ' in: ' . string( actual_pos ) )
+ endif
endif
endfor
return ret
--- a/test/signature_help.test.vim
+++ b/test/signature_help.test.vim
@@ -803,7 +803,7 @@
function! Check( ... )
call youcompleteme#test#popup#CheckPopupPosition(
\ s:_GetSigHelpWinID(),
- \ { 'line': 9, 'col': 8, 'visible': 1 } )
+ \ { 'line': 9, 'col': [6, 8], 'visible': 1 } )
call FeedAndCheckAgain( 'kjkj', funcref( 'Check2' ) )
endfunction
@@ -811,7 +811,7 @@
function! Check2( ... )
call youcompleteme#test#popup#CheckPopupPosition(
\ s:_GetSigHelpWinID(),
- \ { 'line': 9, 'col': 8, 'visible': 0 } )
+ \ { 'line': 9, 'col': [6, 8], 'visible': 0 } )
call FeedAndCheckAgain( 'kjkj', funcref( 'Check3' ) )
endfunction
@@ -819,7 +819,7 @@
function! Check3( ... )
call youcompleteme#test#popup#CheckPopupPosition(
\ s:_GetSigHelpWinID(),
- \ { 'line': 9, 'col': 8, 'visible': 1 } )
+ \ { 'line': 9, 'col': [6, 8], 'visible': 1 } )
call feedkeys( "\<Esc>" )
endfunction
@@ -859,7 +859,7 @@
let popup_id = s:_GetSigHelpWinID()
call youcompleteme#test#popup#CheckPopupPosition(
\ s:_GetSigHelpWinID(),
- \ { 'line': 9, 'col': 8, 'visible': 1 } )
+ \ { 'line': 9, 'col': [6, 8], 'visible': 1 } )
call FeedAndCheckAgain( ')', funcref( 'CheckSigsClosed' ) )
endfunction
|