0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1528: Vim9: :endif not found after "if false"

Problem:    Vim9: :endif not found after "if false".
Solution:   When skipping still check for a following command. (closes #6797)
This commit is contained in:
Bram Moolenaar
2020-08-27 22:43:03 +02:00
parent 601e76ac3c
commit 3988f64f9d
3 changed files with 30 additions and 19 deletions

View File

@@ -2122,6 +2122,14 @@ def Test_if_const_expr()
res = true
endif
assert_equal(false, res)
# with constant "false" expression may be invalid so long as the syntax is OK
if false | eval 0 | endif
if false | eval burp + 234 | endif
if false | echo burp 234 'asd' | endif
if false
burp
endif
enddef
def Test_if_const_expr_fails()