diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-15 17:12:59 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-15 17:14:30 +0800 |
commit | b29df57ba7e7e853a3f8082020e7658f468ea826 (patch) | |
tree | 1e6f73e04e0eeb89bc836bf9cb234abbcaf5d8ca | |
parent | f04125a93554103ff6c24f12506050112679a33a (diff) | |
download | rneovim-b29df57ba7e7e853a3f8082020e7658f468ea826.tar.gz rneovim-b29df57ba7e7e853a3f8082020e7658f468ea826.tar.bz2 rneovim-b29df57ba7e7e853a3f8082020e7658f468ea826.zip |
vim-patch:8.2.4361: Vim9: some tests fail
Problem: Vim9: some tests fail.
Solution: Fix the tests, mostly by removing "s:".
https://github.com/vim/vim/commit/62b191c38758c835a577ef091a803b6dd4cd4f49
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_expr.vim | 3 | ||||
-rw-r--r-- | test/old/testdir/test_functions.vim | 2 | ||||
-rw-r--r-- | test/old/testdir/test_ins_complete.vim | 12 | ||||
-rw-r--r-- | test/old/testdir/test_normal.vim | 4 | ||||
-rw-r--r-- | test/old/testdir/test_tagfunc.vim | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/test/old/testdir/test_expr.vim b/test/old/testdir/test_expr.vim index c9797551ee..95ae54b6c1 100644 --- a/test/old/testdir/test_expr.vim +++ b/test/old/testdir/test_expr.vim @@ -613,7 +613,8 @@ func Test_function_with_funcref() call assert_equal(4, Ref('text')) END call CheckTransLegacySuccess(lines) - " cannot create s: variable in :def function + " skip CheckTransDefSuccess(), cannot assign to script variable + call map(lines, {k, v -> v =~ 'legacy' ? v : substitute(v, 's:', '', 'g')}) call CheckTransVim9Success(lines) endfunc diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 94c7e20264..ad2b6dc563 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -2561,7 +2561,7 @@ func Test_builtin_check() call assert_fails('let l:.trim = {x -> " " .. x}', 'E704:') let lines =<< trim END vim9script - var s:trim = (x) => " " .. x + var trim = (x) => " " .. x END call CheckScriptFailure(lines, 'E704:') diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index af0856331d..cdc998cad2 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -1598,11 +1598,11 @@ func Test_completefunc_callback() bw! # Test for using a script-local function name - def s:LocalCompleteFunc(findstart: number, base: string): any + def LocalCompleteFunc(findstart: number, base: string): any add(g:LocalCompleteFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef - &completefunc = s:LocalCompleteFunc + &completefunc = LocalCompleteFunc new | only setline(1, 'three') g:LocalCompleteFuncArgs = [] @@ -1855,11 +1855,11 @@ func Test_omnifunc_callback() bw! # Test for using a script-local function name - def s:LocalOmniFunc(findstart: number, base: string): any + def LocalOmniFunc(findstart: number, base: string): any add(g:LocalOmniFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef - &omnifunc = s:LocalOmniFunc + &omnifunc = LocalOmniFunc new | only setline(1, 'three') g:LocalOmniFuncArgs = [] @@ -2148,11 +2148,11 @@ func Test_thesaurusfunc_callback() bw! # Test for using a script-local function name - def s:LocalTsrFunc(findstart: number, base: string): any + def LocalTsrFunc(findstart: number, base: string): any add(g:LocalTsrFuncArgs, [findstart, base]) return findstart ? 0 : [] enddef - &thesaurusfunc = s:LocalTsrFunc + &thesaurusfunc = LocalTsrFunc new | only setline(1, 'three') g:LocalTsrFuncArgs = [] diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim index ca91ab2ceb..fe8611d527 100644 --- a/test/old/testdir/test_normal.vim +++ b/test/old/testdir/test_normal.vim @@ -732,10 +732,10 @@ func Test_opfunc_callback() bw! # Test for using a script-local function name - def s:LocalOpFunc(type: string): void + def LocalOpFunc(type: string): void g:LocalOpFuncArgs = [type] enddef - &opfunc = s:LocalOpFunc + &opfunc = LocalOpFunc g:LocalOpFuncArgs = [] normal! g@l assert_equal(['char'], g:LocalOpFuncArgs) diff --git a/test/old/testdir/test_tagfunc.vim b/test/old/testdir/test_tagfunc.vim index cba96d3504..44916f2fc9 100644 --- a/test/old/testdir/test_tagfunc.vim +++ b/test/old/testdir/test_tagfunc.vim @@ -369,11 +369,11 @@ func Test_tagfunc_callback() bw! # Test for using a script-local function name - def s:LocalTagFunc(pat: string, flags: string, info: dict<any> ): any + def LocalTagFunc(pat: string, flags: string, info: dict<any> ): any g:LocalTagFuncArgs = [pat, flags, info] return null enddef - &tagfunc = s:LocalTagFunc + &tagfunc = LocalTagFunc new g:LocalTagFuncArgs = [] assert_fails('tag a12', 'E433:') |