comparison src/testdir/test_expr.vim @ 19415:90e24240904b v8.2.0265

patch 8.2.0265: "eval" after "if 0" doesn't check for following command Commit: https://github.com/vim/vim/commit/a76b31542e1d83b7d2fe7378439912e800a4d0f6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 16 16:20:21 2020 +0100 patch 8.2.0265: "eval" after "if 0" doesn't check for following command Problem: "eval" after "if 0" doesn't check for following command. Solution: Add "eval" to list of commands that check for a following command. (closes #5640)
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Feb 2020 16:30:03 +0100
parents 2a017e9dc6da
children fdfe44ac6a1a
comparison
equal deleted inserted replaced
19414:f6d002d10166 19415:90e24240904b
528 call assert_fails('echo 0x1X', 'E15:') 528 call assert_fails('echo 0x1X', 'E15:')
529 call assert_fails('echo 011X', 'E15:') 529 call assert_fails('echo 011X', 'E15:')
530 call assert_equal(2, str2nr('2a')) 530 call assert_equal(2, str2nr('2a'))
531 call assert_fails('inoremap <Char-0b1z> b', 'E474:') 531 call assert_fails('inoremap <Char-0b1z> b', 'E474:')
532 endfunc 532 endfunc
533
534 func Test_eval_after_if()
535 let s:val = ''
536 func SetVal(x)
537 let s:val ..= a:x
538 endfunc
539 if 0 | eval SetVal('a') | endif | call SetVal('b')
540 call assert_equal('b', s:val)
541 endfunc