Skip to content

Commit 37819ed

Browse files
committed
patch 8.0.0978: writing to terminal job is not tested
Problem: Writing to terminal job is not tested. Solution: Add a test.
1 parent 5983d50 commit 37819ed

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,26 @@ func Test_terminal_noblock()
470470
unlet g:lnum
471471
bwipe
472472
endfunc
473+
474+
func Test_terminal_write_stdin()
475+
" Todo: make this work on all systems.
476+
if !has('unix')
477+
return
478+
endif
479+
new
480+
call setline(1, ['one', 'two', 'three'])
481+
%term wc
482+
call WaitFor('getline(1) != ""')
483+
let nrs = split(getline(1))
484+
call assert_equal(['3', '3', '14'], nrs)
485+
bwipe
486+
487+
call setline(1, ['one', 'two', 'three', 'four'])
488+
2,3term wc
489+
call WaitFor('getline(1) != ""')
490+
let nrs = split(getline(1))
491+
call assert_equal(['2', '2', '10'], nrs)
492+
bwipe
493+
494+
bwipe!
495+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
978,
772774
/**/
773775
977,
774776
/**/

0 commit comments

Comments
 (0)