Mercurial > vim
changeset 12196:9237b087583c v8.0.0978
patch 8.0.0978: writing to terminal job is not tested
commit https://github.com/vim/vim/commit/37819ed54064b949b1f205c9f4084ba32e3db8bc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 20 19:33:47 2017 +0200
patch 8.0.0978: writing to terminal job is not tested
Problem: Writing to terminal job is not tested.
Solution: Add a test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 20 Aug 2017 19:45:05 +0200 |
parents | 2d911fe7acdc |
children | 52afff0db6b2 |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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