diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-22 22:37:20 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-22 22:37:20 +0200 |
commit | 69e44552c567ff25b363ba0790ad3d43fa0397a7 (patch) | |
tree | 061de28c194fbf25ef55c960377a033ed2080525 /src/testdir/test_vimscript.vim | |
parent | cd94277f72e29b740635da84bcd872c96e11bf67 (diff) | |
download | vim-git-69e44552c567ff25b363ba0790ad3d43fa0397a7.tar.gz |
patch 8.2.1512: failure after trinary expression failsv8.2.1512
Problem: Failure after trinary expression fails.
Solution: Restore eval_flags. (Yasuhiro Matsumoto, closes #6776)
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r-- | src/testdir/test_vimscript.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 9dd5fc7ff..f17e9084f 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -7445,6 +7445,30 @@ func Test_typed_script_var() call StopVimInTerminal(buf) endfunc +" Test for issue6776 {{{1 +func Test_trinary_expression() + try + call eval('0 ? 0') + catch + endtry + " previous failure should not cause next expression to fail + call assert_equal(v:false, eval(string(v:false))) + + try + call eval('0 ? "burp') + catch + endtry + " previous failure should not cause next expression to fail + call assert_equal(v:false, eval(string(v:false))) + + try + call eval('1 ? 0 : "burp') + catch + endtry + " previous failure should not cause next expression to fail + call assert_equal(v:false, eval(string(v:false))) +endfunction + "------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |