mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1539: using invalid script ID causes a crash
Problem: Using invalid script ID causes a crash. Solution: Check the script ID to be valid. (closes #6804)
This commit is contained in:
@@ -4,6 +4,7 @@ source check.vim
|
||||
source term_util.vim
|
||||
source view_util.vim
|
||||
source vim9.vim
|
||||
source shared.vim
|
||||
|
||||
def Test_syntax()
|
||||
let var = 234
|
||||
@@ -3252,6 +3253,14 @@ def Test_cmdline_win()
|
||||
delete('rtp', 'rf')
|
||||
enddef
|
||||
|
||||
def Test_invalid_sid()
|
||||
assert_fails('func <SNR>1234_func', 'E123:')
|
||||
if RunVim([], ['wq Xdidit'], '+"func <SNR>1_func"')
|
||||
call assert_equal([], readfile('Xdidit'))
|
||||
endif
|
||||
delete('Xdidit')
|
||||
enddef
|
||||
|
||||
" Keep this last, it messes up highlighting.
|
||||
def Test_substitute_cmd()
|
||||
new
|
||||
|
Reference in New Issue
Block a user