forked from VimPlug/jedi-vim
Fix goto tests
This commit is contained in:
@@ -262,7 +262,7 @@ def goto(mode="goto", no_output=False):
|
|||||||
% d.desc_with_module)
|
% d.desc_with_module)
|
||||||
else:
|
else:
|
||||||
using_tagstack = int(vim_eval('g:jedi#use_tag_stack')) == 1
|
using_tagstack = int(vim_eval('g:jedi#use_tag_stack')) == 1
|
||||||
if d.module_path != vim.current.buffer.name:
|
if (d.module_path or '') != vim.current.buffer.name:
|
||||||
result = new_buffer(d.module_path,
|
result = new_buffer(d.module_path,
|
||||||
using_tagstack=using_tagstack)
|
using_tagstack=using_tagstack)
|
||||||
if not result:
|
if not result:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ describe 'goto simple'
|
|||||||
it 'goto definitions'
|
it 'goto definitions'
|
||||||
normal \d
|
normal \d
|
||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
|
Expect col('.') == 5
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'goto assignments'
|
it 'goto assignments'
|
||||||
@@ -111,7 +112,7 @@ describe 'goto with buffers'
|
|||||||
put = ['import os']
|
put = ['import os']
|
||||||
normal G$
|
normal G$
|
||||||
call jedi#goto_assignments()
|
call jedi#goto_assignments()
|
||||||
python jedi_vim.goto()
|
PythonJedi jedi_vim.goto()
|
||||||
Expect CurrentBufferIsModule('os') == 0
|
Expect CurrentBufferIsModule('os') == 0
|
||||||
" Without hidden, it's not possible to open a new buffer, when the old
|
" Without hidden, it's not possible to open a new buffer, when the old
|
||||||
" one is not saved.
|
" one is not saved.
|
||||||
|
|||||||
Reference in New Issue
Block a user