diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-16 20:25:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-16 20:25:23 +0200 |
commit | 1e021e63c565bbb30783a557b4e883cc27f56403 (patch) | |
tree | 0e0b4b4b39e9cd3bf76a91c86e3c5f9259fbea79 /src/testdir/test_vim9_script.vim | |
parent | 7a66a17190f2f64688a697ea29d58388612122ce (diff) |
patch 8.2.1854: Vim9: crash when throwing exception for NULL stringv8.2.1854
Problem: Vim9: crash when throwing exception for NULL string. (Dhiraj
Mishra)
Solution: Handle NULL string like empty string. (closes #7139)
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 43c66cc40f..9a2a481586 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -617,6 +617,21 @@ def Test_throw_vimscript() endtry END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + def Func() + throw @r + enddef + var result = '' + try + Func() + catch /E1129:/ + result = 'caught' + endtry + assert_equal('caught', result) + END + CheckScriptSuccess(lines) enddef def Test_error_in_nested_function() |