aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_startup.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-07 07:04:49 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-07 07:33:58 +0800
commitb0190f4543397d6f3485e1eb03f30f80e358c201 (patch)
tree8f1c9ee36a5fade1506207f2b0ca1f77ef17a1ec /src/nvim/testdir/test_startup.vim
parent3b3611a3d0f1e13e277360d6bacf97a0fb7eb6de (diff)
downloadrneovim-b0190f4543397d6f3485e1eb03f30f80e358c201.tar.gz
rneovim-b0190f4543397d6f3485e1eb03f30f80e358c201.tar.bz2
rneovim-b0190f4543397d6f3485e1eb03f30f80e358c201.zip
vim-patch:8.2.2849: bufwrite not sufficiently tested
Problem: Bufwrite not sufficiently tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8192) https://github.com/vim/vim/commit/36f96a515109dc1fad279571a645c0f0d65f2de4 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/testdir/test_startup.vim')
-rw-r--r--src/nvim/testdir/test_startup.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim
index 30bbd355df..f9f7c5b492 100644
--- a/src/nvim/testdir/test_startup.vim
+++ b/src/nvim/testdir/test_startup.vim
@@ -1279,4 +1279,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