diff --git a/test/signatures.vim b/test/signatures.vim index b2c57e7..c69d9f6 100644 --- a/test/signatures.vim +++ b/test/signatures.vim @@ -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()