From bdf86d53f1d059499d0b133be8c7267acb2fb6e5 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sat, 24 Aug 2013 01:35:47 +0430 Subject: [PATCH] finally working goto with buffers tests --- test/goto.vim | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/test/goto.vim b/test/goto.vim index 8fd27f6..b252305 100644 --- a/test/goto.vim +++ b/test/goto.vim @@ -18,7 +18,7 @@ describe 'goto_simple' end after - close! + bd! end it 'goto_definitions' @@ -45,13 +45,12 @@ describe 'goto_simple' end end -describe 'goto_with_new_tabs' +describe 'goto_with_tabs' before set filetype=python end after - close! bd! bd! end @@ -73,4 +72,33 @@ describe 'goto_with_new_tabs' 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