comparison src/testdir/test_vim9_script.vim @ 26660:2b17f87b7bd1 v8.2.3859

patch 8.2.3859: Vim9: some code lines not tested Commit: https://github.com/vim/vim/commit/a99fb23842f055c511bfe1b62de7bbd14d5a99c0 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 20 12:25:03 2021 +0000 patch 8.2.3859: Vim9: some code lines not tested Problem: Vim9: some code lines not tested. Solution: Add a few specific tests.
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Dec 2021 13:30:03 +0100
parents ed73553992bf
children 254fffd11fda
comparison
equal deleted inserted replaced
26659:c4b51a7d535e 26660:2b17f87b7bd1
2961 CheckDefExecAndScriptFailure(lines, ['E461:', 'E1017:']) 2961 CheckDefExecAndScriptFailure(lines, ['E461:', 'E1017:'])
2962 enddef 2962 enddef
2963 2963
2964 def Test_for_loop_script_var() 2964 def Test_for_loop_script_var()
2965 # cannot use s:var in a :def function 2965 # cannot use s:var in a :def function
2966 CheckDefFailure(['for s:var in range(3)', 'echo 3'], 'E461:') 2966 CheckDefFailure(['for s:var in range(3)', 'echo 3'], 'E1254:')
2967 2967
2968 # can use s:var in Vim9 script, with or without s: 2968 # can use s:var in Vim9 script, with or without s:
2969 var lines =<< trim END 2969 var lines =<< trim END
2970 vim9script 2970 vim9script
2971 var total = 0 2971 var total = 0