From 83540e66a47e9fd4e9df3e46f0771a5996807b27 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 22 Aug 2013 23:23:46 +0430 Subject: [PATCH] goto tests that are working --- test/goto.vim | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/test/goto.vim b/test/goto.vim index fae4525..54d9eb3 100644 --- a/test/goto.vim +++ b/test/goto.vim @@ -1,13 +1,19 @@ +let mapleader = '\' +source plugin/jedi.vim + describe 'goto_simple' before new + set filetype=python put =[ \ 'def a(): pass', \ 'b = a', \ 'c = b', \ ] + normal! ggdd normal! G$ Expect line('.') == 3 + Expect g:loaded_jedi == 1 end after @@ -15,15 +21,27 @@ describe 'goto_simple' end it 'goto_definitions' - Expect range(1) == [0] + echo &runtimepath + silent normal \d + Expect line('.') == 1 + "Expect col('.') == 5 end it 'goto_assignments' - normal! g + silent normal \g Expect line('.') == 2 + Expect col('.') == 1 + + " cursor before `=` means that it stays there. + silent normal \g + Expect line('.') == 2 + Expect col('.') == 1 + + " going to the last line changes it. normal! $ - normal! g + silent normal \g Expect line('.') == 1 + Expect col('.') == 5 end end