]> granicus.if.org Git - vim/commitdiff
patch 8.0.0978: writing to terminal job is not tested v8.0.0978
authorBram Moolenaar <Bram@vim.org>
Sun, 20 Aug 2017 17:33:47 +0000 (19:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 Aug 2017 17:33:47 +0000 (19:33 +0200)
Problem:    Writing to terminal job is not tested.
Solution:   Add a test.

src/testdir/test_terminal.vim
src/version.c

index a4041d72526bca8e1f1f80d212575b77730a6409..b3868553e393f6740b3df1cfc3e66081585d8c4f 100644 (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
index 432849f483f4f36d3a50bc0825f23ebdafd8a87b..0488c199d39bee4b22cc6bb5f11d24523f2a0c67 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    978,
 /**/
     977,
 /**/