To: vim_dev@googlegroups.com Subject: Patch 8.2.4361 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4361 (after 8.2.4360) Problem: Vim9: some tests fail. Solution: Fix the tests, mostly by removing "s:". Files: src/testdir/test_expr.vim, src/testdir/test_functions.vim, src/testdir/test_ins_complete.vim, src/testdir/test_normal.vim, src/testdir/test_tagfunc.vim *** ../vim-8.2.4360/src/testdir/test_expr.vim 2022-01-31 14:59:33.526943578 +0000 --- src/testdir/test_expr.vim 2022-02-12 20:25:10.877686677 +0000 *************** *** 612,618 **** call assert_equal(4, Ref('text')) END call v9.CheckTransLegacySuccess(lines) ! " cannot create s: variable in :def function call v9.CheckTransVim9Success(lines) endfunc --- 612,619 ---- call assert_equal(4, Ref('text')) END call v9.CheckTransLegacySuccess(lines) ! " skip CheckTransDefSuccess(), cannot assign to script variable ! call map(lines, {k, v -> v =~ 'legacy' ? v : substitute(v, 's:', '', 'g')}) call v9.CheckTransVim9Success(lines) endfunc *** ../vim-8.2.4360/src/testdir/test_functions.vim 2022-01-29 21:45:30.485921485 +0000 --- src/testdir/test_functions.vim 2022-02-12 20:26:16.949581243 +0000 *************** *** 2798,2804 **** call assert_fails('let l:.trim = {x -> " " .. x}', 'E704:') let lines =<< trim END vim9script ! var s:trim = (x) => " " .. x END call v9.CheckScriptFailure(lines, 'E704:') --- 2798,2804 ---- call assert_fails('let l:.trim = {x -> " " .. x}', 'E704:') let lines =<< trim END vim9script ! var trim = (x) => " " .. x END call v9.CheckScriptFailure(lines, 'E704:') *** ../vim-8.2.4360/src/testdir/test_ins_complete.vim 2022-01-30 18:56:31.961463935 +0000 --- src/testdir/test_ins_complete.vim 2022-02-12 20:29:44.737263001 +0000 *************** *** 1514,1524 **** bw! # Test for using a script-local function name ! def s:LocalCompleteFunc(findstart: number, base: string): any add(g:LocalCompleteFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &completefunc = s:LocalCompleteFunc new | only setline(1, 'three') g:LocalCompleteFuncArgs = [] --- 1514,1524 ---- bw! # Test for using a script-local function name ! def LocalCompleteFunc(findstart: number, base: string): any add(g:LocalCompleteFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &completefunc = LocalCompleteFunc new | only setline(1, 'three') g:LocalCompleteFuncArgs = [] *************** *** 1771,1781 **** bw! # Test for using a script-local function name ! def s:LocalOmniFunc(findstart: number, base: string): any add(g:LocalOmniFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &omnifunc = s:LocalOmniFunc new | only setline(1, 'three') g:LocalOmniFuncArgs = [] --- 1771,1781 ---- bw! # Test for using a script-local function name ! def LocalOmniFunc(findstart: number, base: string): any add(g:LocalOmniFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &omnifunc = LocalOmniFunc new | only setline(1, 'three') g:LocalOmniFuncArgs = [] *************** *** 2064,2074 **** bw! # Test for using a script-local function name ! def s:LocalTsrFunc(findstart: number, base: string): any add(g:LocalTsrFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &thesaurusfunc = s:LocalTsrFunc new | only setline(1, 'three') g:LocalTsrFuncArgs = [] --- 2064,2074 ---- bw! # Test for using a script-local function name ! def LocalTsrFunc(findstart: number, base: string): any add(g:LocalTsrFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef ! &thesaurusfunc = LocalTsrFunc new | only setline(1, 'three') g:LocalTsrFuncArgs = [] *** ../vim-8.2.4360/src/testdir/test_normal.vim 2022-01-29 21:45:30.485921485 +0000 --- src/testdir/test_normal.vim 2022-02-12 20:30:18.777212405 +0000 *************** *** 684,693 **** bw! # Test for using a script-local function name ! def s:LocalOpFunc(type: string): void g:LocalOpFuncArgs = [type] enddef ! &opfunc = s:LocalOpFunc g:LocalOpFuncArgs = [] normal! g@l assert_equal(['char'], g:LocalOpFuncArgs) --- 684,693 ---- bw! # Test for using a script-local function name ! def LocalOpFunc(type: string): void g:LocalOpFuncArgs = [type] enddef ! &opfunc = LocalOpFunc g:LocalOpFuncArgs = [] normal! g@l assert_equal(['char'], g:LocalOpFuncArgs) *** ../vim-8.2.4360/src/testdir/test_tagfunc.vim 2022-01-29 21:45:30.485921485 +0000 --- src/testdir/test_tagfunc.vim 2022-02-12 20:31:53.917072949 +0000 *************** *** 369,379 **** bw! # Test for using a script-local function name ! def s:LocalTagFunc(pat: string, flags: string, info: dict ): any g:LocalTagFuncArgs = [pat, flags, info] return null enddef ! &tagfunc = s:LocalTagFunc new g:LocalTagFuncArgs = [] assert_fails('tag a12', 'E433:') --- 369,379 ---- bw! # Test for using a script-local function name ! def LocalTagFunc(pat: string, flags: string, info: dict ): any g:LocalTagFuncArgs = [pat, flags, info] return null enddef ! &tagfunc = LocalTagFunc new g:LocalTagFuncArgs = [] assert_fails('tag a12', 'E433:') *** ../vim-8.2.4360/src/version.c 2022-02-12 19:52:22.028702244 +0000 --- src/version.c 2022-02-12 20:34:23.760858182 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4361, /**/ -- My sister Cecilia opened a computer store in Hawaii. She sells C shells by the seashore. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///