Mercurial > vim
comparison src/testdir/test_vimscript.vim @ 21925:51d591dbb8df v8.2.1512
patch 8.2.1512: failure after trinary expression fails
Commit: https://github.com/vim/vim/commit/69e44552c567ff25b363ba0790ad3d43fa0397a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 22 22:37:20 2020 +0200
patch 8.2.1512: failure after trinary expression fails
Problem: Failure after trinary expression fails.
Solution: Restore eval_flags. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/6776)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 22 Aug 2020 22:45:03 +0200 |
parents | 99fe9e960207 |
children | ff21e2962490 |
comparison
equal
deleted
inserted
replaced
21924:7972b1494d5e | 21925:51d591dbb8df |
---|---|
7443 call WaitForAssert({-> assert_match('^E116:', term_getline(buf, 5))}) | 7443 call WaitForAssert({-> assert_match('^E116:', term_getline(buf, 5))}) |
7444 | 7444 |
7445 call StopVimInTerminal(buf) | 7445 call StopVimInTerminal(buf) |
7446 endfunc | 7446 endfunc |
7447 | 7447 |
7448 " Test for issue6776 {{{1 | |
7449 func Test_trinary_expression() | |
7450 try | |
7451 call eval('0 ? 0') | |
7452 catch | |
7453 endtry | |
7454 " previous failure should not cause next expression to fail | |
7455 call assert_equal(v:false, eval(string(v:false))) | |
7456 | |
7457 try | |
7458 call eval('0 ? "burp') | |
7459 catch | |
7460 endtry | |
7461 " previous failure should not cause next expression to fail | |
7462 call assert_equal(v:false, eval(string(v:false))) | |
7463 | |
7464 try | |
7465 call eval('1 ? 0 : "burp') | |
7466 catch | |
7467 endtry | |
7468 " previous failure should not cause next expression to fail | |
7469 call assert_equal(v:false, eval(string(v:false))) | |
7470 endfunction | |
7471 | |
7448 "------------------------------------------------------------------------------- | 7472 "------------------------------------------------------------------------------- |
7449 " Modelines {{{1 | 7473 " Modelines {{{1 |
7450 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker | 7474 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |
7451 "------------------------------------------------------------------------------- | 7475 "------------------------------------------------------------------------------- |