mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
finally working goto with buffers tests
This commit is contained in:
@@ -18,7 +18,7 @@ describe 'goto_simple'
|
|||||||
end
|
end
|
||||||
|
|
||||||
after
|
after
|
||||||
close!
|
bd!
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'goto_definitions'
|
it 'goto_definitions'
|
||||||
@@ -45,13 +45,12 @@ describe 'goto_simple'
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'goto_with_new_tabs'
|
describe 'goto_with_tabs'
|
||||||
before
|
before
|
||||||
set filetype=python
|
set filetype=python
|
||||||
end
|
end
|
||||||
|
|
||||||
after
|
after
|
||||||
close!
|
|
||||||
bd!
|
bd!
|
||||||
bd!
|
bd!
|
||||||
end
|
end
|
||||||
@@ -73,4 +72,33 @@ describe 'goto_with_new_tabs'
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'goto_with_buffers'
|
||||||
|
before
|
||||||
|
set filetype=python
|
||||||
|
let g:jedi#use_tabs_not_buffers = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
after
|
||||||
|
bd!
|
||||||
|
bd!
|
||||||
|
set nohidden
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'no_new_tabs'
|
||||||
|
put = ['import os']
|
||||||
|
normal G$
|
||||||
|
call jedi#goto_assignments()
|
||||||
|
python jedi_vim.goto()
|
||||||
|
Expect g:current_buffer_is_module('os') == 0
|
||||||
|
" Without hidden, it's not possible to open a new buffer, when the old
|
||||||
|
" one is not saved.
|
||||||
|
set hidden
|
||||||
|
call jedi#goto_assignments()
|
||||||
|
Expect g:current_buffer_is_module('os') == 1
|
||||||
|
Expect tabpagenr('$') == 1
|
||||||
|
Expect line('.') == 1
|
||||||
|
Expect col('.') == 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
" vim: et:ts=4:sw=4
|
" vim: et:ts=4:sw=4
|
||||||
|
|||||||
Reference in New Issue
Block a user