summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-05 17:11:12 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-05 17:11:12 +0100
commitd0fe620cbbf5f5e00446efa89893036265c5c302 (patch)
tree284d0046b8738f9ab05bdf2bf2c44d1a0a1db676 /src/testdir/test_vim9_cmd.vim
parentc0913d023b8bb728e9832727fe1657dbddf685d0 (diff)
patch 8.2.2094: when an expression fails getting next command may be wrongv8.2.2094
Problem: When an expression fails getting the next command may be wrong. Solution: Do not check for a next command after :eval fails. (closes #7415)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 162d79508d..37fc559bf0 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -558,6 +558,19 @@ def Test_eval_command()
->Increment()
assert_equal(111 + 3 + 4 + 5, g:val)
unlet g:val
+
+ var lines =<< trim END
+ vim9script
+ g:caught = 'no'
+ try
+ eval 123 || 0
+ catch
+ g:caught = 'yes'
+ endtry
+ assert_equal('yes', g:caught)
+ unlet g:caught
+ END
+ CheckScriptSuccess(lines)
enddef
def Test_map_command()