mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
Add test case for truncation of cmdline signatures
This commit is contained in:
committed by
Daniel Hahler
parent
7abc3ad8d4
commit
62c423bf29
@@ -53,6 +53,39 @@ describe 'signatures'
|
||||
Expect msg == "\n"
|
||||
end
|
||||
|
||||
it 'command line truncation'
|
||||
let g:jedi#show_call_signatures = 2
|
||||
call jedi#configure_call_signatures()
|
||||
|
||||
function! Signature()
|
||||
redir => msg
|
||||
Python jedi_vim.show_call_signatures()
|
||||
redir END
|
||||
return msg
|
||||
endfunction
|
||||
|
||||
let funcname = repeat('a', &columns - 30)
|
||||
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
|
||||
put = ' pass'
|
||||
execute "normal o".funcname."( "
|
||||
Expect Signature() == "\n".funcname."(arg1, ...)"
|
||||
|
||||
normal sarg1,
|
||||
Expect Signature() == "\n".funcname."(..., arg2, ...)"
|
||||
|
||||
normal sarg2, arg3,
|
||||
Expect Signature() == "\n".funcname."(..., a, b, c)"
|
||||
|
||||
normal sa, b,
|
||||
Expect Signature() == "\n".funcname."(..., c)"
|
||||
|
||||
g/^/d
|
||||
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
|
||||
put = ' pass'
|
||||
execute "normal o".funcname."( "
|
||||
Expect Signature() == "\n".funcname."(...)"
|
||||
end
|
||||
|
||||
it 'command line no signature'
|
||||
let g:jedi#show_call_signatures = 2
|
||||
call jedi#configure_call_signatures()
|
||||
|
||||
Reference in New Issue
Block a user