mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
test/old: enable passing tests
Some TODO tests are passing now. test_override('ALL', 1) clears previous overrides so it's safe to comment out and execute the test. Replace test_feedinput() with nvim_input(). Replace test_setmouse with nvim_input_mouse(). Note that test_setmouse is 1-based and nvim_input_mouse is 0-based.
This commit is contained in:
@@ -735,17 +735,16 @@ func! Test_edit_CTRL_O()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func! Test_edit_CTRL_R()
|
func! Test_edit_CTRL_R()
|
||||||
throw 'skipped: Nvim does not support test_override()'
|
|
||||||
" Insert Register
|
" Insert Register
|
||||||
new
|
new
|
||||||
call test_override("ALL", 1)
|
" call test_override("ALL", 1)
|
||||||
set showcmd
|
set showcmd
|
||||||
call feedkeys("AFOOBAR eins zwei\<esc>", 'tnix')
|
call feedkeys("AFOOBAR eins zwei\<esc>", 'tnix')
|
||||||
call feedkeys("O\<c-r>.", 'tnix')
|
call feedkeys("O\<c-r>.", 'tnix')
|
||||||
call feedkeys("O\<c-r>=10*500\<cr>\<esc>", 'tnix')
|
call feedkeys("O\<c-r>=10*500\<cr>\<esc>", 'tnix')
|
||||||
call feedkeys("O\<c-r>=getreg('=', 1)\<cr>\<esc>", 'tnix')
|
call feedkeys("O\<c-r>=getreg('=', 1)\<cr>\<esc>", 'tnix')
|
||||||
call assert_equal(["getreg('=', 1)", '5000', "FOOBAR eins zwei", "FOOBAR eins zwei"], getline(1, '$'))
|
call assert_equal(["getreg('=', 1)", '5000', "FOOBAR eins zwei", "FOOBAR eins zwei"], getline(1, '$'))
|
||||||
call test_override("ALL", 0)
|
" call test_override("ALL", 0)
|
||||||
set noshowcmd
|
set noshowcmd
|
||||||
bw!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
@@ -957,7 +956,6 @@ func! Test_edit_DROP()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func! Test_edit_CTRL_V()
|
func! Test_edit_CTRL_V()
|
||||||
throw 'skipped: Nvim does not support test_override()'
|
|
||||||
if has("ebcdic")
|
if has("ebcdic")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@@ -967,7 +965,7 @@ func! Test_edit_CTRL_V()
|
|||||||
" force some redraws
|
" force some redraws
|
||||||
set showmode showcmd
|
set showmode showcmd
|
||||||
"call test_override_char_avail(1)
|
"call test_override_char_avail(1)
|
||||||
call test_override('ALL', 1)
|
" call test_override('ALL', 1)
|
||||||
call feedkeys("A\<c-v>\<c-n>\<c-v>\<c-l>\<c-v>\<c-b>\<esc>", 'tnix')
|
call feedkeys("A\<c-v>\<c-n>\<c-v>\<c-l>\<c-v>\<c-b>\<esc>", 'tnix')
|
||||||
call assert_equal(["abc\x0e\x0c\x02"], getline(1, '$'))
|
call assert_equal(["abc\x0e\x0c\x02"], getline(1, '$'))
|
||||||
|
|
||||||
@@ -980,7 +978,7 @@ func! Test_edit_CTRL_V()
|
|||||||
set norl
|
set norl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call test_override('ALL', 0)
|
" call test_override('ALL', 0)
|
||||||
set noshowmode showcmd
|
set noshowmode showcmd
|
||||||
bw!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -1222,16 +1222,16 @@ func Test_reg_executing_and_recording()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_getchar()
|
func Test_getchar()
|
||||||
throw 'skipped: Nvim does not support test_setmouse()'
|
|
||||||
call feedkeys('a', '')
|
call feedkeys('a', '')
|
||||||
call assert_equal(char2nr('a'), getchar())
|
call assert_equal(char2nr('a'), getchar())
|
||||||
|
|
||||||
call test_setmouse(1, 3)
|
" call test_setmouse(1, 3)
|
||||||
let v:mouse_win = 9
|
" let v:mouse_win = 9
|
||||||
let v:mouse_winid = 9
|
" let v:mouse_winid = 9
|
||||||
let v:mouse_lnum = 9
|
" let v:mouse_lnum = 9
|
||||||
let v:mouse_col = 9
|
" let v:mouse_col = 9
|
||||||
call feedkeys("\<S-LeftMouse>", '')
|
" call feedkeys("\<S-LeftMouse>", '')
|
||||||
|
call nvim_input_mouse('left', 'press', 'S', 0, 0, 2)
|
||||||
call assert_equal("\<S-LeftMouse>", getchar())
|
call assert_equal("\<S-LeftMouse>", getchar())
|
||||||
call assert_equal(1, v:mouse_win)
|
call assert_equal(1, v:mouse_win)
|
||||||
call assert_equal(win_getid(1), v:mouse_winid)
|
call assert_equal(win_getid(1), v:mouse_winid)
|
||||||
|
@@ -233,16 +233,17 @@ func Test_timer_catch_error()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func FeedAndPeek(timer)
|
func FeedAndPeek(timer)
|
||||||
call test_feedinput('a')
|
" call test_feedinput('a')
|
||||||
|
call nvim_input('a')
|
||||||
call getchar(1)
|
call getchar(1)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Interrupt(timer)
|
func Interrupt(timer)
|
||||||
call test_feedinput("\<C-C>")
|
" call test_feedinput("\<C-C>")
|
||||||
|
call nvim_input("\<C-C>")
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_peek_and_get_char()
|
func Test_peek_and_get_char()
|
||||||
throw 'skipped: Nvim does not support test_feedinput()'
|
|
||||||
if !has('unix') && !has('gui_running')
|
if !has('unix') && !has('gui_running')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user