Mercurial > vim
comparison src/testdir/test_startup.vim @ 24733:08eced3add83 v8.2.2905
patch 8.2.2905: no error when defaults.vim cannot be loaded
Commit: https://github.com/vim/vim/commit/1d3a14ecf0cdde026984894c592dc140a2b46887
Author: Christian Brabandt <cb@256bit.org>
Date: Sat May 29 19:53:50 2021 +0200
patch 8.2.2905: no error when defaults.vim cannot be loaded
Problem: No error when defaults.vim cannot be loaded.
Solution: Add an error message. (Christian Brabandt, closes https://github.com/vim/vim/issues/8248)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 May 2021 20:00:04 +0200 |
parents | 9f48b262539b |
children | e5beb841778d |
comparison
equal
deleted
inserted
replaced
24732:c0f0fca0a06c | 24733:08eced3add83 |
---|---|
272 call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline \\d\\+: sourcing \"[^\"]*runtime[\\/]filetype\.vim\".*\n", out) | 272 call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline \\d\\+: sourcing \"[^\"]*runtime[\\/]filetype\.vim\".*\n", out) |
273 call assert_match(" verbose=2\n", out) | 273 call assert_match(" verbose=2\n", out) |
274 | 274 |
275 let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq') | 275 let out = system(GetVimCommand() . ' --clean -es -X -V15 -c "set verbose?" -cq') |
276 call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out) | 276 call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\r\nline 1: \" The default vimrc file\..* verbose=15\n", out) |
277 endfunc | |
278 | |
279 " Test that an error is shown when the defaults.vim file could not be read | |
280 func Test_defaults_error() | |
281 " Can't catch the output of gvim. | |
282 CheckNotGui | |
283 CheckNotMSWindows | |
284 | |
285 let out = system('VIMRUNTIME=/tmp ' .. GetVimCommand() .. ' --clean -cq') | |
286 call assert_match("E1187: Failed to source defaults.vim", out) | |
287 | |
288 let out = system('VIMRUNTIME=/tmp ' .. GetVimCommand() .. ' -u DEFAULTS -cq') | |
289 call assert_match("E1187: Failed to source defaults.vim", out) | |
277 endfunc | 290 endfunc |
278 | 291 |
279 " Test the '-q [errorfile]' argument. | 292 " Test the '-q [errorfile]' argument. |
280 func Test_q_arg() | 293 func Test_q_arg() |
281 CheckFeature quickfix | 294 CheckFeature quickfix |