commit 9a5b3a39f32bfb8c9b4b6c810b782e0e4b234a1a
parent ea2d226df6f344451306274f3f99911d459fb9dd
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date: Mon, 21 Jul 2025 19:39:08 -0400
vim-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 vim/vim#8248)
https://github.com/vim/vim/commit/1d3a14ecf0cdde026984894c592dc140a2b46887
Neovim doesn't support defaults.vim.
N/A test but this should "help" reduce patch rejections.
vim-patch:8.2.2906: ASAN reports errors for test_startup
Problem: ASAN reports errors for test_startup for unknown reasons.
Solution: Temporarily disable the new test.
https://github.com/vim/vim/commit/a5787c3742b43a8e662045a4e38c7a6ba957acbf
vim-patch:8.2.2927: test commented out because it fails with ASAN
Problem: Test commented out because it fails with ASAN.
Solution: Only skip the test when running with ASAN.
https://github.com/vim/vim/commit/a83d06026d0e0dad873de296bff97707ad2faff3
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat:
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/test/old/testdir/test_startup.vim b/test/old/testdir/test_startup.vim
@@ -282,6 +282,23 @@ 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()
+ throw 'Skipped: Nvim does not support defaults.vim'
+ " Can't catch the output of gvim.
+ CheckNotGui
+ CheckNotMSWindows
+ " For unknown reasons freeing all memory does not work here, even though
+ " EXITFREE is defined.
+ CheckNotAsan
+
+ 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