Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 27978:442ca2007bec v8.2.4514
patch 8.2.4514: Vim9: some flow commands can be shortened
Commit: https://github.com/vim/vim/commit/b2175220dafc28349b275ac7f3080f89cce78a57
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 5 20:24:41 2022 +0000
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".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Mar 2022 21:30:03 +0100 |
parents | 212c5894b8b1 |
children | 0c84b198c678 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -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()