comparison src/testdir/test_vim9_func.vim @ 25030:214fddf4c765 v8.2.3052

patch 8.2.3052: Vim9: "legacy call" does not work Commit: https://github.com/vim/vim/commit/ce024c3e20839465dc8c8f79dcccc5414dd8c506 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 26 13:00:49 2021 +0200 patch 8.2.3052: Vim9: "legacy call" does not work Problem: Vim9: "legacy call" does not work. Solution: Do not skip "call" after "legacy". (closes https://github.com/vim/vim/issues/8454)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jun 2021 13:15:03 +0200
parents 0136c6ee1961
children efdb9608cc11
comparison
equal deleted inserted replaced
25029:61af9ea403ab 25030:214fddf4c765
2314 legacy call s:Func() 2314 legacy call s:Func()
2315 END 2315 END
2316 CheckScriptSuccess(lines) 2316 CheckScriptSuccess(lines)
2317 enddef 2317 enddef
2318 2318
2319 def Test_legacy()
2320 var lines =<< trim END
2321 vim9script
2322 func g:LegacyFunction()
2323 let g:legacyvar = 1
2324 endfunc
2325 def Testit()
2326 legacy call g:LegacyFunction()
2327 enddef
2328 Testit()
2329 assert_equal(1, g:legacyvar)
2330 unlet g:legacyvar
2331 delfunc g:LegacyFunction
2332 END
2333 CheckScriptSuccess(lines)
2334 enddef
2335
2319 def Test_legacy_errors() 2336 def Test_legacy_errors()
2320 for cmd in ['if', 'elseif', 'else', 'endif', 2337 for cmd in ['if', 'elseif', 'else', 'endif',
2321 'for', 'endfor', 'continue', 'break', 2338 'for', 'endfor', 'continue', 'break',
2322 'while', 'endwhile', 2339 'while', 'endwhile',
2323 'try', 'catch', 'finally', 'endtry'] 2340 'try', 'catch', 'finally', 'endtry']