diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-29 13:39:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-29 13:39:17 +0200 |
commit | e3d4685f1f716e0c516332101d85e0930f20fc59 (patch) | |
tree | 60b4b08d87d23ceb87227df3bedf8aa16305f21c /src/testdir | |
parent | 423a85a11a9d3d658906aea715fed7fe6aa83cd8 (diff) | |
download | vim-git-e3d4685f1f716e0c516332101d85e0930f20fc59.tar.gz |
patch 8.2.1539: using invalid script ID causes a crashv8.2.1539
Problem: Using invalid script ID causes a crash.
Solution: Check the script ID to be valid. (closes #6804)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 054fe4cbf..49aacb0fa 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -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 |