mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 11:27:26 +10:00
vim-patch:8.2.1512: failure after trinary expression fails
Problem: Failure after trinary expression fails.
Solution: Restore eval_flags. (Yasuhiro Matsumoto, closes vim/vim#6776)
69e44552c5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -7258,6 +7258,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
|
||||
|
||||
func Test_for_over_string()
|
||||
let res = ''
|
||||
for c in 'aéc̀d'
|
||||
|
||||
Reference in New Issue
Block a user