0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.0.0978: writing to terminal job is not tested

Problem:    Writing to terminal job is not tested.
Solution:   Add a test.
This commit is contained in:
Bram Moolenaar
2017-08-20 19:33:47 +02:00
parent 5983d50247
commit 37819ed540
2 changed files with 25 additions and 0 deletions

View File

@@ -470,3 +470,26 @@ func Test_terminal_noblock()
unlet g:lnum
bwipe
endfunc
func Test_terminal_write_stdin()
" Todo: make this work on all systems.
if !has('unix')
return
endif
new
call setline(1, ['one', 'two', 'three'])
%term wc
call WaitFor('getline(1) != ""')
let nrs = split(getline(1))
call assert_equal(['3', '3', '14'], nrs)
bwipe
call setline(1, ['one', 'two', 'three', 'four'])
2,3term wc
call WaitFor('getline(1) != ""')
let nrs = split(getline(1))
call assert_equal(['2', '2', '10'], nrs)
bwipe
bwipe!
endfunc

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
978,
/**/
977,
/**/