comparison 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
comparison
equal deleted inserted replaced
27977:9432710dac71 27978:442ca2007bec
3379 'cons', 3379 'cons',
3380 'brea', 3380 'brea',
3381 'cat', 3381 'cat',
3382 'catc', 3382 'catc',
3383 'con', 3383 'con',
3384 'cont',
3385 'conti',
3386 'contin',
3387 'continu',
3384 'el', 3388 'el',
3385 'els', 3389 'els',
3386 'elsei', 3390 'elsei',
3387 'endfo', 3391 'endfo',
3388 'en', 3392 'en',
3389 'end', 3393 'end',
3390 'endi', 3394 'endi',
3391 'endw', 3395 'endw',
3392 'endt', 3396 'endt',
3393 'endtr', 3397 'endtr',
3398 'exp',
3399 'expo',
3400 'expor',
3394 'fina', 3401 'fina',
3395 'finall', 3402 'finall',
3403 'imp',
3404 'impo',
3405 'impor',
3406 'retu',
3407 'retur',
3396 'th', 3408 'th',
3397 'thr', 3409 'thr',
3398 'thro', 3410 'thro',
3399 'wh', 3411 'wh',
3400 'whi', 3412 'whi',
3401 'whil', 3413 'whil',
3402 ] 3414 ]
3403 for name in names 3415 for name in names
3404 v9.CheckDefAndScriptFailure([name .. ' '], 'E1065:') 3416 v9.CheckDefAndScriptFailure([name .. ' '], 'E1065:')
3405 endfor 3417 endfor
3418
3419 var lines =<< trim END
3420 vim9script
3421 def SomeFunc()
3422 endd
3423 END
3424 v9.CheckScriptFailure(lines, 'E1065:')
3425 lines =<< trim END
3426 vim9script
3427 def SomeFunc()
3428 endde
3429 END
3430 v9.CheckScriptFailure(lines, 'E1065:')
3406 enddef 3431 enddef
3407 3432
3408 def Test_unset_any_variable() 3433 def Test_unset_any_variable()
3409 var lines =<< trim END 3434 var lines =<< trim END
3410 var name: any 3435 var name: any