mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch:8.0.1048: no test for what 8.0.1020 fixes
Problem: No test for what 8.0.1020 fixes.
Solution: Add test_feedinput(). Add a test. (Ozaki Kiichi, closes vim/vim#2046)
5e80de3f3e
This commit is contained in:
@@ -169,5 +169,25 @@ func Test_stop_all_in_callback()
|
|||||||
call assert_equal(0, len(info))
|
call assert_equal(0, len(info))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func FeedAndPeek(timer)
|
||||||
|
call test_feedinput('a')
|
||||||
|
call getchar(1)
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Interrupt(timer)
|
||||||
|
call test_feedinput("\<C-C>")
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_peek_and_get_char()
|
||||||
|
throw 'skipped: Nvim does not support test_feedinput()'
|
||||||
|
if !has('unix') && !has('gui_running')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
call timer_start(0, 'FeedAndPeek')
|
||||||
|
let intr = timer_start(100, 'Interrupt')
|
||||||
|
let c = getchar()
|
||||||
|
call assert_equal(char2nr('a'), c)
|
||||||
|
call timer_stop(intr)
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Reference in New Issue
Block a user