forked from aniani/vim
patch 8.2.4314: test fails where lines are skipped
Problem: Test fails where lines are skipped. Solution: Only give an error when not skipping commands.
This commit is contained in:
parent
5f4ef5f5e5
commit
8cbf249917
@ -1228,6 +1228,11 @@ def Test_vim9script_fails()
|
|||||||
|
|
||||||
assert_fails('vim9script', 'E1038:')
|
assert_fails('vim9script', 'E1038:')
|
||||||
v9.CheckDefFailure(['vim9script'], 'E1038:')
|
v9.CheckDefFailure(['vim9script'], 'E1038:')
|
||||||
|
|
||||||
|
# no error when skipping
|
||||||
|
if has('nothing')
|
||||||
|
vim9script
|
||||||
|
endif
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_script_var_shadows_function()
|
def Test_script_var_shadows_function()
|
||||||
|
@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4314,
|
||||||
/**/
|
/**/
|
||||||
4313,
|
4313,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3139,8 +3139,13 @@ compile_def_function(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_vim9script:
|
case CMD_vim9script:
|
||||||
|
if (cctx.ctx_skip != SKIP_YES)
|
||||||
|
{
|
||||||
emsg(_(e_vim9script_can_only_be_used_in_script));
|
emsg(_(e_vim9script_can_only_be_used_in_script));
|
||||||
goto erret;
|
goto erret;
|
||||||
|
}
|
||||||
|
line = (char_u *)"";
|
||||||
|
break;
|
||||||
|
|
||||||
case CMD_global:
|
case CMD_global:
|
||||||
if (check_global_and_subst(ea.cmd, p) == FAIL)
|
if (check_global_and_subst(ea.cmd, p) == FAIL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user