comparison src/testdir/test_terminal.vim @ 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 6947d5bcf57f
children 65cff399750b
comparison
equal deleted inserted replaced
12195:2d911fe7acdc 12196:9237b087583c
468 unlet g:buf 468 unlet g:buf
469 unlet g:job 469 unlet g:job
470 unlet g:lnum 470 unlet g:lnum
471 bwipe 471 bwipe
472 endfunc 472 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