mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
test(oldtest): cherry-pick needed test functions from v8.1.1336
Cherry-pick Test_call() and Test_cindent_func(). Required for v8.1.1911 and v8.1.1915.
This commit is contained in:
@@ -1473,6 +1473,18 @@ func Test_readdir()
|
||||
call delete('Xdir', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_call()
|
||||
call assert_equal(3, call('len', [123]))
|
||||
call assert_fails("call call('len', 123)", 'E714:')
|
||||
call assert_equal(0, call('', []))
|
||||
|
||||
function Mylen() dict
|
||||
return len(self.data)
|
||||
endfunction
|
||||
let mydict = {'data': [0, 1, 2, 3], 'len': function("Mylen")}
|
||||
call assert_fails("call call('Mylen', [], 0)", 'E715:')
|
||||
endfunc
|
||||
|
||||
" Test for the eval() function
|
||||
func Test_eval()
|
||||
call assert_fails("call eval('5 a')", 'E488:')
|
||||
|
Reference in New Issue
Block a user