Skip to content

Commit bb8387e

Browse files
committed
Use ... instead of optional function argument
1 parent 03628c8 commit bb8387e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/utils/async-helper.vader

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ Execute (set up async helper):
1010
call OmniSharpTestAwait(a:funcname, a:args, 1)
1111
endfunction
1212

13-
function! OmniSharpTestAwait(funcname, args, warmup = 0) abort
13+
function! OmniSharpTestAwait(funcname, args, ...) abort
14+
let warmup = a:0 ? a:1 : 0
1415
let g:OmniSharp_test_waiting = 1
1516
call function(a:funcname, a:args + [function('s:Callback')])()
1617
let starttime = reltime()
1718
while g:OmniSharp_test_waiting
1819
\ && reltime(starttime)[0] < g:OmniSharp_test_timeout
1920
sleep 50m
2021
endwhile
21-
if !a:warmup
22+
if !warmup
2223
Assert !g:OmniSharp_test_waiting, a:funcname . ' timed out'
2324
endif
2425
endfunction

0 commit comments

Comments
 (0)