mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +08:00
first goto tests
This commit is contained in:
30
test/goto.vim
Normal file
30
test/goto.vim
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
describe 'goto_simple'
|
||||||
|
before
|
||||||
|
new
|
||||||
|
put =[
|
||||||
|
\ 'def a(): pass',
|
||||||
|
\ 'b = a',
|
||||||
|
\ 'c = b',
|
||||||
|
\ ]
|
||||||
|
normal! G$
|
||||||
|
Expect line('.') == 3
|
||||||
|
end
|
||||||
|
|
||||||
|
after
|
||||||
|
close!
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'goto_definitions'
|
||||||
|
Expect range(1) == [0]
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'goto_assignments'
|
||||||
|
normal! <leader>g
|
||||||
|
Expect line('.') == 2
|
||||||
|
normal! $
|
||||||
|
normal! <leader>g
|
||||||
|
Expect line('.') == 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
" vim: et:ts=4:sw=4
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
describe '...'
|
|
||||||
before
|
|
||||||
new
|
|
||||||
put =[
|
|
||||||
\ 'foo',
|
|
||||||
\ 'bar',
|
|
||||||
\ 'baz',
|
|
||||||
\ '...',
|
|
||||||
\ ]
|
|
||||||
end
|
|
||||||
|
|
||||||
after
|
|
||||||
close!
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'blub'
|
|
||||||
Expect range(1) == [0]
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'bla'
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'ble'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
" vim: et:ts=2:sw=2
|
|
||||||
Reference in New Issue
Block a user