diff src/testdir/test_startup.vim @ 9806:108b62925cb0 v7.4.2178

commit https://github.com/vim/vim/commit/3a938383396d4ab352bbb4d806938302debdae2c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 7 16:36:40 2016 +0200 patch 7.4.2178 Problem: No test for reading from stdin. Solution: Add a test.
author Christian Brabandt <cb@256bit.org>
date Sun, 07 Aug 2016 16:45:05 +0200
parents 4ef933b816e7
children 0470742f7346
line wrap: on
line diff
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -169,3 +169,15 @@ func Test_startuptime()
   endif
   call delete('Xtestout')
 endfunc
+
+func Test_read_stdin()
+  let after = [
+	\ 'write Xtestout',
+	\ 'quit!',
+	\ ]
+  if RunVimPiped([], after, '-', 'echo something | ')
+    let lines = readfile('Xtestout')
+    call assert_equal('something', lines[0])
+  endif
+  call delete('Xtestout')
+endfunc