From 867228005462ac8a599e44f22ba0fa4d2f64ea9a Mon Sep 17 00:00:00 2001 From: David Halter Date: Sat, 24 Aug 2013 15:43:21 +0430 Subject: [PATCH] goto definition tests for multiple results (opens quickfix window) --- test/goto.vim | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/goto.vim b/test/goto.vim index 0a76e9a..9d41a73 100644 --- a/test/goto.vim +++ b/test/goto.vim @@ -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 \" + Expect tabpagenr('$') == 2 + Expect g:current_buffer_is_module('token') == 1 + + bd + silent normal G$\d + execute "normal j\" + 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 \" + Expect tabpagenr('$') == 1 + Expect g:current_buffer_is_module('token') == 1 + + bd + silent normal G$\d + execute "normal j\" + Expect tabpagenr('$') == 1 + Expect g:current_buffer_is_module('tokenize') == 1 + end end " vim: et:ts=4:sw=4