mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-09 03:54:52 +08:00
goto tests that are working
This commit is contained in:
@@ -1,13 +1,19 @@
|
|||||||
|
let mapleader = '\'
|
||||||
|
source plugin/jedi.vim
|
||||||
|
|
||||||
describe 'goto_simple'
|
describe 'goto_simple'
|
||||||
before
|
before
|
||||||
new
|
new
|
||||||
|
set filetype=python
|
||||||
put =[
|
put =[
|
||||||
\ 'def a(): pass',
|
\ 'def a(): pass',
|
||||||
\ 'b = a',
|
\ 'b = a',
|
||||||
\ 'c = b',
|
\ 'c = b',
|
||||||
\ ]
|
\ ]
|
||||||
|
normal! ggdd
|
||||||
normal! G$
|
normal! G$
|
||||||
Expect line('.') == 3
|
Expect line('.') == 3
|
||||||
|
Expect g:loaded_jedi == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
after
|
after
|
||||||
@@ -15,15 +21,27 @@ describe 'goto_simple'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'goto_definitions'
|
it 'goto_definitions'
|
||||||
Expect range(1) == [0]
|
echo &runtimepath
|
||||||
|
silent normal \d
|
||||||
|
Expect line('.') == 1
|
||||||
|
"Expect col('.') == 5
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'goto_assignments'
|
it 'goto_assignments'
|
||||||
normal! <leader>g
|
silent normal \g
|
||||||
Expect line('.') == 2
|
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! $
|
||||||
normal! <leader>g
|
silent normal \g
|
||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
|
Expect col('.') == 5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user