patch 9.1.1097: --log with non-existent path causes a crash
Problem: --log with non-existent path causes a crash
(Ekkosun)
Solution: split initialization phase and init the execution stack
earlier (Hirohito Higashi)
fixes: #16606
closes: #16610
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 7c70391..c16e4ae 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -740,6 +740,13 @@
call delete('Xlogfile')
endfunc
+func Test_log_nonexistent()
+ " this used to crash Vim
+ CheckFeature channel
+ let result = join(systemlist(GetVimCommand() .. ' --log /X/Xlogfile -c qa!'))
+ call assert_match("E484: Can't open file", result)
+endfunc
+
func Test_read_stdin()
let after =<< trim [CODE]
write Xtestout