diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-05-13 18:33:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-13 18:33:16 +0200 |
commit | 36f96a515109dc1fad279571a645c0f0d65f2de4 (patch) | |
tree | 0e5c8738ce367105f01e5fec3e3eefcbcc5834d6 /src/testdir/test_startup.vim | |
parent | fe8ebdbe5c4e116311c0c0d5937b89ded5c92d01 (diff) |
patch 8.2.2849: bufwrite not sufficiently testedv8.2.2849
Problem: Bufwrite not sufficiently tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes #8192)
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 6e814704a1..1f14e86e3b 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -1270,4 +1270,19 @@ func Test_progname() call delete('Xprogname', 'd') endfunc +" Test for doing a write from .vimrc +func Test_write_in_vimrc() + call writefile(['silent! write'], 'Xvimrc') + let after =<< trim [CODE] + call assert_match('E32: ', v:errmsg) + call writefile(v:errors, 'Xtestout') + qall + [CODE] + if RunVim([], after, '-u Xvimrc') + call assert_equal([], readfile('Xtestout')) + call delete('Xtestout') + endif + call delete('Xvimrc') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |