goto definition tests for multiple results (opens quickfix window)

This commit is contained in:
David Halter
2013-08-24 15:43:21 +04:30
parent c7c266ed29
commit 8672280054

View File

@@ -71,6 +71,22 @@ describe 'goto_with_tabs'
tabprevious
Expect bufname('%') == ''
end
it 'multi_definitions'
put = ['import tokenize']
silent normal G$\d
Expect g:current_buffer_is_module('tokenize') == 0
Expect g:current_buffer_is_module('token') == 0
execute "normal \<CR>"
Expect tabpagenr('$') == 2
Expect g:current_buffer_is_module('token') == 1
bd
silent normal G$\d
execute "normal j\<CR>"
Expect tabpagenr('$') == 2
Expect g:current_buffer_is_module('tokenize') == 1
end
end
@@ -101,6 +117,23 @@ describe 'goto_with_buffers'
Expect line('.') == 1
Expect col('.') == 1
end
it 'multi_definitions'
set hidden
put = ['import tokenize']
silent normal G$\d
Expect g:current_buffer_is_module('tokenize') == 0
Expect g:current_buffer_is_module('token') == 0
execute "normal \<CR>"
Expect tabpagenr('$') == 1
Expect g:current_buffer_is_module('token') == 1
bd
silent normal G$\d
execute "normal j\<CR>"
Expect tabpagenr('$') == 1
Expect g:current_buffer_is_module('tokenize') == 1
end
end
" vim: et:ts=4:sw=4