0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.4514: Vim9: some flow commands can be shortened

Problem:    Vim9: some flow commands can be shortened.
Solution:   Also require using the full name for ":return", ":enddef",
            ":continue", ":export" and ":import".
This commit is contained in:
Bram Moolenaar
2022-03-05 20:24:41 +00:00
parent b29ae15977
commit b2175220da
6 changed files with 40 additions and 10 deletions

View File

@@ -3381,6 +3381,10 @@ def Test_minimal_command_name_length()
'cat',
'catc',
'con',
'cont',
'conti',
'contin',
'continu',
'el',
'els',
'elsei',
@@ -3391,8 +3395,16 @@ def Test_minimal_command_name_length()
'endw',
'endt',
'endtr',
'exp',
'expo',
'expor',
'fina',
'finall',
'imp',
'impo',
'impor',
'retu',
'retur',
'th',
'thr',
'thro',
@@ -3403,6 +3415,19 @@ def Test_minimal_command_name_length()
for name in names
v9.CheckDefAndScriptFailure([name .. ' '], 'E1065:')
endfor
var lines =<< trim END
vim9script
def SomeFunc()
endd
END
v9.CheckScriptFailure(lines, 'E1065:')
lines =<< trim END
vim9script
def SomeFunc()
endde
END
v9.CheckScriptFailure(lines, 'E1065:')
enddef
def Test_unset_any_variable()