Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 25551:5ab75ca75d21 v8.2.3312
patch 8.2.3312: Vim9: after "if false" line breaks in expression not skipped
Commit: https://github.com/vim/vim/commit/e525bdda3aa29f0ffcb18d8d16903ebafc2b5881
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 7 18:12:40 2021 +0200
patch 8.2.3312: Vim9: after "if false" line breaks in expression not skipped
Problem: Vim9: after "if false" line breaks in expression not skipped.
Solution: Do parse the expression. (closes https://github.com/vim/vim/issues/8723)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Aug 2021 18:15:03 +0200 |
parents | 2ae1d5a4ae5c |
children | 27cb2e79ccde |
comparison
equal
deleted
inserted
replaced
25550:6934c5328627 | 25551:5ab75ca75d21 |
---|---|
2370 if false | eval burp + 234 | endif | 2370 if false | eval burp + 234 | endif |
2371 if false | echo burp 234 'asd' | endif | 2371 if false | echo burp 234 'asd' | endif |
2372 if false | 2372 if false |
2373 burp | 2373 burp |
2374 endif | 2374 endif |
2375 | |
2376 # expression with line breaks skipped | |
2377 if false | |
2378 ('aaa' | |
2379 .. 'bbb' | |
2380 .. 'ccc' | |
2381 )->setline(1) | |
2382 endif | |
2375 enddef | 2383 enddef |
2376 | 2384 |
2377 def Test_if_const_expr_fails() | 2385 def Test_if_const_expr_fails() |
2378 CheckDefFailure(['if "aaa" == "bbb'], 'E114:') | 2386 CheckDefFailure(['if "aaa" == "bbb'], 'E114:') |
2379 CheckDefFailure(["if 'aaa' == 'bbb"], 'E115:') | 2387 CheckDefFailure(["if 'aaa' == 'bbb"], 'E115:') |