Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
9805:33d5778e0ec0 | 9806:108b62925cb0 |
---|---|
167 endfor | 167 endfor |
168 call assert_equal(expected, found) | 168 call assert_equal(expected, found) |
169 endif | 169 endif |
170 call delete('Xtestout') | 170 call delete('Xtestout') |
171 endfunc | 171 endfunc |
172 | |
173 func Test_read_stdin() | |
174 let after = [ | |
175 \ 'write Xtestout', | |
176 \ 'quit!', | |
177 \ ] | |
178 if RunVimPiped([], after, '-', 'echo something | ') | |
179 let lines = readfile('Xtestout') | |
180 call assert_equal('something', lines[0]) | |
181 endif | |
182 call delete('Xtestout') | |
183 endfunc |