diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-07 16:36:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-07 16:36:40 +0200 |
commit | 3a938383396d4ab352bbb4d806938302debdae2c (patch) | |
tree | f700bdd239a46a1b534a27eec05c701c511ac749 /src/testdir/test_startup.vim | |
parent | ba98bef1910094179bf90b9467b6e2d2f9462601 (diff) | |
download | vim-git-3a938383396d4ab352bbb4d806938302debdae2c.tar.gz |
patch 7.4.2178v7.4.2178
Problem: No test for reading from stdin.
Solution: Add a test.
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 384dcbe2e..652318fb7 100644 --- 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 |