mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-09 12:04:50 +08:00
added tests for checking other goto will perform in only one window, no other split buffer will be opened accidentially
This commit is contained in:
@@ -67,6 +67,7 @@ describe 'goto_with_tabs'
|
|||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
Expect col('.') == 1
|
Expect col('.') == 1
|
||||||
Expect tabpagenr('$') == 2
|
Expect tabpagenr('$') == 2
|
||||||
|
Expect winnr('$') == 1
|
||||||
tabprevious
|
tabprevious
|
||||||
Expect bufname('%') == ''
|
Expect bufname('%') == ''
|
||||||
end
|
end
|
||||||
@@ -78,12 +79,14 @@ describe 'goto_with_tabs'
|
|||||||
Expect g:current_buffer_is_module('token') == 0
|
Expect g:current_buffer_is_module('token') == 0
|
||||||
execute "normal \<CR>"
|
execute "normal \<CR>"
|
||||||
Expect tabpagenr('$') == 2
|
Expect tabpagenr('$') == 2
|
||||||
|
Expect winnr('$') == 1
|
||||||
Expect g:current_buffer_is_module('token') == 1
|
Expect g:current_buffer_is_module('token') == 1
|
||||||
|
|
||||||
bd
|
bd
|
||||||
silent normal G$\d
|
silent normal G$\d
|
||||||
execute "normal j\<CR>"
|
execute "normal j\<CR>"
|
||||||
Expect tabpagenr('$') == 2
|
Expect tabpagenr('$') == 2
|
||||||
|
Expect winnr('$') == 1
|
||||||
Expect g:current_buffer_is_module('tokenize') == 1
|
Expect g:current_buffer_is_module('tokenize') == 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -112,6 +115,7 @@ describe 'goto_with_buffers'
|
|||||||
set hidden
|
set hidden
|
||||||
call jedi#goto_assignments()
|
call jedi#goto_assignments()
|
||||||
Expect g:current_buffer_is_module('os') == 1
|
Expect g:current_buffer_is_module('os') == 1
|
||||||
|
Expect winnr('$') == 1
|
||||||
Expect tabpagenr('$') == 1
|
Expect tabpagenr('$') == 1
|
||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
Expect col('.') == 1
|
Expect col('.') == 1
|
||||||
@@ -125,12 +129,14 @@ describe 'goto_with_buffers'
|
|||||||
Expect g:current_buffer_is_module('token') == 0
|
Expect g:current_buffer_is_module('token') == 0
|
||||||
execute "normal \<CR>"
|
execute "normal \<CR>"
|
||||||
Expect tabpagenr('$') == 1
|
Expect tabpagenr('$') == 1
|
||||||
|
Expect winnr('$') == 1
|
||||||
Expect g:current_buffer_is_module('token') == 1
|
Expect g:current_buffer_is_module('token') == 1
|
||||||
|
|
||||||
bd
|
bd
|
||||||
silent normal G$\d
|
silent normal G$\d
|
||||||
execute "normal j\<CR>"
|
execute "normal j\<CR>"
|
||||||
Expect tabpagenr('$') == 1
|
Expect tabpagenr('$') == 1
|
||||||
|
Expect winnr('$') == 1
|
||||||
Expect g:current_buffer_is_module('tokenize') == 1
|
Expect g:current_buffer_is_module('tokenize') == 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user