diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.lua | 42 | ||||
-rw-r--r-- | src/nvim/testdir/test_expand_func.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_expr.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_findfile.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_fnameescape.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_fnamemodify.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_fold.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 13 | ||||
-rw-r--r-- | src/nvim/testdir/test_search.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_vimscript.vim | 2 |
10 files changed, 40 insertions, 41 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index c6ac27b269..f9f6af3bfd 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -102,38 +102,38 @@ return { diff_hlID={args=2, base=1}, empty={args=1, base=1}, environ={}, - escape={args=2}, + escape={args=2, base=1}, eval={args=1, base=1}, eventhandler={}, - executable={args=1}, - execute={args={1, 2}}, - exepath={args=1}, - exists={args=1}, + executable={args=1, base=1}, + execute={args={1, 2}, base=1}, + exepath={args=1, base=1}, + exists={args=1, base=1}, exp={args=1, base=1, func="float_op_wrapper", data="&exp"}, - expand={args={1, 3}}, - expandcmd={args=1}, + expand={args={1, 3}, base=1}, + expandcmd={args=1, base=1}, extend={args={2, 3}, base=1}, - feedkeys={args={1, 2}}, - file_readable={args=1, func='f_filereadable'}, -- obsolete - filereadable={args=1}, - filewritable={args=1}, + feedkeys={args={1, 2}, base=1}, + file_readable={args=1, base=1, func='f_filereadable'}, -- obsolete + filereadable={args=1, base=1}, + filewritable={args=1, base=1}, filter={args=2, base=1}, - finddir={args={1, 3}}, - findfile={args={1, 3}}, + finddir={args={1, 3}, base=1}, + findfile={args={1, 3}, base=1}, flatten={args={1, 2}}, float2nr={args=1, base=1}, floor={args=1, base=1, func="float_op_wrapper", data="&floor"}, fmod={args=2, base=1}, - fnameescape={args=1}, - fnamemodify={args=2}, - foldclosed={args=1}, - foldclosedend={args=1}, - foldlevel={args=1}, + fnameescape={args=1, base=1}, + fnamemodify={args=2, base=1}, + foldclosed={args=1, base=1}, + foldclosedend={args=1, base=1}, + foldlevel={args=1, base=1}, foldtext={}, - foldtextresult={args=1}, + foldtextresult={args=1, base=1}, foreground={}, - funcref={args={1, 3}}, - ['function']={args={1, 3}}, + funcref={args={1, 3}, base=1}, + ['function']={args={1, 3}, base=1}, garbagecollect={args={0, 1}}, get={args={2, 3}, base=1}, getbufinfo={args={0, 1}}, diff --git a/src/nvim/testdir/test_expand_func.vim b/src/nvim/testdir/test_expand_func.vim index 4d9e89fe3e..44d2c156d5 100644 --- a/src/nvim/testdir/test_expand_func.vim +++ b/src/nvim/testdir/test_expand_func.vim @@ -40,7 +40,7 @@ endfunc func Test_expand() new call assert_equal("", expand('%:S')) - call assert_equal('3', expand('<slnum>')) + call assert_equal('3', '<slnum>'->expand()) call assert_equal(['4'], expand('<slnum>', v:false, v:true)) " Don't add any line above this, otherwise <slnum> will change. quit diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index c49285621a..6343c47fde 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -147,7 +147,7 @@ function Test_printf_spec_s() call assert_equal(string(value), printf('%s', value)) " funcref - call assert_equal('printf', printf('%s', function('printf'))) + call assert_equal('printf', printf('%s', 'printf'->function())) " partial call assert_equal(string(function('printf', ['%s'])), printf('%s', function('printf', ['%s']))) @@ -477,7 +477,7 @@ func Test_funcref() endfunc call assert_equal(2, OneByName()) call assert_equal(1, OneByRef()) - let OneByRef = funcref('One') + let OneByRef = 'One'->funcref() call assert_equal(2, OneByRef()) call assert_fails('echo funcref("{")', 'E475:') let OneByRef = funcref("One", repeat(["foo"], 20)) diff --git a/src/nvim/testdir/test_findfile.vim b/src/nvim/testdir/test_findfile.vim index 2195bf527e..d92706dbe5 100644 --- a/src/nvim/testdir/test_findfile.vim +++ b/src/nvim/testdir/test_findfile.vim @@ -50,7 +50,7 @@ func Test_findfile() set path=. call assert_equal('Xdir2/foo', findfile('foo')) call assert_equal('', findfile('bar')) - call assert_equal('Xdir2/foobar', findfile('foobar')) + call assert_equal('Xdir2/foobar', 'foobar'->findfile()) " Empty {path} 2nd argument is the same as no 2nd argument. call assert_equal('Xdir2/foo', findfile('foo', '')) @@ -138,7 +138,7 @@ func Test_finddir() cd Xdir1 call assert_equal('Xdir2', finddir('Xdir2')) - call assert_equal('', finddir('Xdir3')) + call assert_equal('', 'Xdir3'->finddir()) " Files should not be found (findfile() finds them). call assert_equal('', finddir('foo')) diff --git a/src/nvim/testdir/test_fnameescape.vim b/src/nvim/testdir/test_fnameescape.vim index 0bafdc29fb..cdb96ba5ff 100644 --- a/src/nvim/testdir/test_fnameescape.vim +++ b/src/nvim/testdir/test_fnameescape.vim @@ -13,7 +13,7 @@ func Test_fnameescape() let fname = 'Xemark!' let status = v:false try - exe "w! " . fnameescape(fname) + exe "w! " . fname->fnameescape() let status = v:true endtry call assert_true(status, "ExclamationMark") diff --git a/src/nvim/testdir/test_fnamemodify.vim b/src/nvim/testdir/test_fnamemodify.vim index fe1df8fd4a..411f7ebbb3 100644 --- a/src/nvim/testdir/test_fnamemodify.vim +++ b/src/nvim/testdir/test_fnamemodify.vim @@ -13,7 +13,7 @@ func Test_fnamemodify() call assert_equal('a', fnamemodify('../testdir/a', ':.')) call assert_equal('~/testdir/test.out', fnamemodify('test.out', ':~')) call assert_equal('~/testdir/a', fnamemodify('../testdir/a', ':~')) - call assert_equal('a', fnamemodify('../testdir/a', ':t')) + call assert_equal('a', '../testdir/a'->fnamemodify(':t')) call assert_equal('', fnamemodify('.', ':p:t')) call assert_equal('test.out', fnamemodify('test.out', ':p:t')) call assert_equal('out', fnamemodify('test.out', ':p:e')) diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 2cc5b47cb0..5586fe2151 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -88,7 +88,7 @@ func Test_indent_fold2() setl fen fdm=marker 2 norm! >> - let a=map(range(1,5), 'foldclosed(v:val)') + let a=map(range(1,5), 'v:val->foldclosed()') call assert_equal([-1,-1,-1,4,4], a) bw! endfunc @@ -132,7 +132,7 @@ func Test_indent_fold_with_read() call assert_equal(0, foldlevel(3)) call assert_equal(0, foldlevel(4)) call assert_equal(1, foldlevel(5)) - call assert_equal(7, foldclosedend(5)) + call assert_equal(7, 5->foldclosedend()) bwipe! set foldmethod& @@ -207,7 +207,7 @@ func Test_update_folds_expr_read() %foldclose call assert_equal(2, foldclosedend(1)) call assert_equal(0, foldlevel(3)) - call assert_equal(0, foldlevel(4)) + call assert_equal(0, 4->foldlevel()) call assert_equal(6, foldclosedend(5)) call assert_equal(10, foldclosedend(7)) call assert_equal(14, foldclosedend(11)) @@ -663,7 +663,7 @@ func Test_fold_move() call assert_equal(10, foldclosed(10)) call assert_equal(11, foldclosedend(10)) call assert_equal('+-- 2 lines: Line2', foldtextresult(2)) - call assert_equal('+-- 2 lines: Line8', foldtextresult(10)) + call assert_equal('+-- 2 lines: Line8', 10->foldtextresult()) set fdm& sw& fdl& enew! diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 9268a13d4e..e3a80be6d5 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1057,7 +1057,7 @@ func Test_filewritable() call assert_equal(0, filewritable('Xfilewritable')) call assert_notequal(0, setfperm('Xfilewritable', 'rw-r-----')) - call assert_equal(1, filewritable('Xfilewritable')) + call assert_equal(1, 'Xfilewritable'->filewritable()) call assert_equal(0, filewritable('doesnotexist')) @@ -1068,12 +1068,12 @@ endfunc func Test_Executable() if has('win32') call assert_equal(1, executable('notepad')) - call assert_equal(1, executable('notepad.exe')) + call assert_equal(1, 'notepad.exe'->executable()) call assert_equal(0, executable('notepad.exe.exe')) call assert_equal(0, executable('shell32.dll')) call assert_equal(0, executable('win.ini')) elseif has('unix') - call assert_equal(1, executable('cat')) + call assert_equal(1, 'cat'->executable()) call assert_equal(0, executable('nodogshere')) " get "cat" path and remove the leading / @@ -1082,8 +1082,7 @@ func Test_Executable() " check that the relative path works in / lcd / call assert_equal(1, executable(catcmd)) - " let result = catcmd->exepath() - let result = exepath(catcmd) + let result = catcmd->exepath() " when using chroot looking for sbin/cat can return bin/cat, that is OK if catcmd =~ '\<sbin\>' && result =~ '\<bin\>' call assert_equal('/' .. substitute(catcmd, '\<sbin\>', 'bin', ''), result) @@ -1320,7 +1319,7 @@ func Test_func_exists_on_reload() call writefile(['func ExistingFunction()', 'echo "yes"', 'endfunc'], 'Xfuncexists') call assert_equal(0, exists('*ExistingFunction')) source Xfuncexists - call assert_equal(1, exists('*ExistingFunction')) + call assert_equal(1, '*ExistingFunction'->exists()) " Redefining a function when reloading a script is OK. source Xfuncexists call assert_equal(1, exists('*ExistingFunction')) @@ -1351,7 +1350,7 @@ func Test_func_sandbox() sandbox let F = {-> 'hello'} call assert_equal('hello', F()) - sandbox let F = {-> execute("normal ix\<Esc>")} + sandbox let F = {-> "normal ix\<Esc>"->execute()} call assert_fails('call F()', 'E48:') unlet F diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 5ba24d047c..7570049e7c 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -1338,7 +1338,7 @@ func Test_search_display_pattern() call cursor(1, 1) let @/ = 'foo' - let pat = escape(@/, '()*?'. '\s\+') + let pat = @/->escape('()*?'. '\s\+') let g:a = execute(':unsilent :norm! n') call assert_match(pat, g:a) diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index b18ce563d3..34733f127f 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -635,7 +635,7 @@ function! MSG(enr, emsg) if v:errmsg == "" Xout "Message missing." else - let v:errmsg = escape(v:errmsg, '"') + let v:errmsg = v:errmsg->escape('"') Xout "Unexpected message:" v:errmsg endif endif |