summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_startup.vim
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2021-05-29 19:53:50 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-29 19:53:50 +0200
commit1d3a14ecf0cdde026984894c592dc140a2b46887 (patch)
tree61f1f20638e52bd684584205a7f2cdbf20a1a286 /src/testdir/test_startup.vim
parent74ede80aeb272ac81d41a256057c4f250372dd00 (diff)
patch 8.2.2905: no error when defaults.vim cannot be loadedv8.2.2905
Problem: No error when defaults.vim cannot be loaded. Solution: Add an error message. (Christian Brabandt, closes #8248)
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r--src/testdir/test_startup.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 1f14e86e3b..76060bf7bd 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -276,6 +276,19 @@ func Test_V_arg()
call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out)
endfunc
+" Test that an error is shown when the defaults.vim file could not be read
+func Test_defaults_error()
+ " Can't catch the output of gvim.
+ CheckNotGui
+ CheckNotMSWindows
+
+ let out = system('VIMRUNTIME=/tmp ' .. GetVimCommand() .. ' --clean -cq')
+ call assert_match("E1187: Failed to source defaults.vim", out)
+
+ let out = system('VIMRUNTIME=/tmp ' .. GetVimCommand() .. ' -u DEFAULTS -cq')
+ call assert_match("E1187: Failed to source defaults.vim", out)
+endfunc
+
" Test the '-q [errorfile]' argument.
func Test_q_arg()
CheckFeature quickfix