aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.lua24
-rw-r--r--src/nvim/testdir/test_bufwintabinfo.vim2
-rw-r--r--src/nvim/testdir/test_cursor_func.vim2
-rw-r--r--src/nvim/testdir/test_expr.vim2
-rw-r--r--src/nvim/testdir/test_functions.vim2
-rw-r--r--src/nvim/testdir/test_put.vim2
-rw-r--r--src/nvim/testdir/test_quickfix.vim4
-rw-r--r--src/nvim/testdir/test_sha256.vim10
-rw-r--r--src/nvim/testdir/test_tabpage.vim4
-rw-r--r--src/nvim/testdir/test_tagjump.vim2
-rw-r--r--src/nvim/testdir/test_vartabs.vim2
11 files changed, 28 insertions, 28 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 78c4b1ee4d..6a800e5648 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -314,18 +314,18 @@ return {
setenv={args=2, base=2},
setfperm={args=2, base=1},
setline={args=2, base=2},
- setloclist={args={2, 4}},
- setmatches={args={1, 2}},
- setpos={args=2},
- setqflist={args={1, 3}},
- setreg={args={2, 3}},
- settabvar={args=3},
- settabwinvar={args=4},
- settagstack={args={2, 3}},
- setwinvar={args=3},
- sha256={args=1},
- shellescape={args={1, 2}},
- shiftwidth={args={0, 1}},
+ setloclist={args={2, 4}, base=2},
+ setmatches={args={1, 2}, base=1},
+ setpos={args=2, base=2},
+ setqflist={args={1, 3}, base=1},
+ setreg={args={2, 3}, base=2},
+ settabvar={args=3, base=3},
+ settabwinvar={args=4, base=4},
+ settagstack={args={2, 3}, base=2},
+ setwinvar={args=3, base=3},
+ sha256={args=1, base=1},
+ shellescape={args={1, 2}, base=1},
+ shiftwidth={args={0, 1}, base=1},
sign_define={args={1, 2}, base=1},
sign_getdefined={args={0, 1}, base=1},
sign_getplaced={args={0, 2}, base=1},
diff --git a/src/nvim/testdir/test_bufwintabinfo.vim b/src/nvim/testdir/test_bufwintabinfo.vim
index c04c8fbf60..d2c99563d9 100644
--- a/src/nvim/testdir/test_bufwintabinfo.vim
+++ b/src/nvim/testdir/test_bufwintabinfo.vim
@@ -48,7 +48,7 @@ function Test_getbufwintabinfo()
tabnew | let w3_id = win_getid()
new | let w4_id = win_getid()
vert new | let w5_id = win_getid()
- call setwinvar(0, 'signal', 'green')
+ eval 'green'->setwinvar(0, 'signal')
tabfirst
let winlist = getwininfo()
call assert_equal(5, len(winlist))
diff --git a/src/nvim/testdir/test_cursor_func.vim b/src/nvim/testdir/test_cursor_func.vim
index a2482d95c4..d96a35ef53 100644
--- a/src/nvim/testdir/test_cursor_func.vim
+++ b/src/nvim/testdir/test_cursor_func.vim
@@ -37,7 +37,7 @@ endfunc
" Very short version of what matchparen does.
function s:Highlight_Matching_Pair()
let save_cursor = getcurpos()
- call setpos('.', save_cursor)
+ eval save_cursor->setpos('.')
endfunc
func Test_curswant_with_autocommand()
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 6343c47fde..a8cf6577f6 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -493,7 +493,7 @@ func Test_setmatches()
let set[0]['conceal'] = 5
let exp[0]['conceal'] = '5'
endif
- call setmatches(set)
+ eval set->setmatches()
call assert_equal(exp, getmatches())
endfunc
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 2fcdd94188..ef33cd5dd8 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1219,7 +1219,7 @@ func Test_shellescape()
let save_shell = &shell
set shell=bash
call assert_equal("'text'", shellescape('text'))
- call assert_equal("'te\"xt'", shellescape('te"xt'))
+ call assert_equal("'te\"xt'", 'te"xt'->shellescape())
call assert_equal("'te'\\''xt'", shellescape("te'xt"))
call assert_equal("'te%xt'", shellescape("te%xt"))
diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim
index 8d8cc77025..f42b177c50 100644
--- a/src/nvim/testdir/test_put.vim
+++ b/src/nvim/testdir/test_put.vim
@@ -39,7 +39,7 @@ func Test_put_lines()
call assert_equal(['Line 3', '', 'Line 1', 'Line2'], getline(1, '$'))
" clean up
bw!
- call setreg('a', a[0], a[1])
+ eval a[0]->setreg('a', a[1])
endfunc
func Test_put_expr()
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index b38a59e98f..6db679c5f9 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -811,7 +811,7 @@ func Test_locationlist()
" NOTE: problem 1:
" intentionally not setting 'lnum' so that the quickfix entries are not
" valid
- call setloclist(0, qflist, ' ')
+ eval qflist->setloclist(0, ' ')
endfor
" Test A
@@ -1699,7 +1699,7 @@ endfunc
func Test_setqflist_invalid_nr()
" The following command used to crash Vim
- call setqflist([], ' ', {'nr' : $XXX_DOES_NOT_EXIST})
+ eval []->setqflist(' ', {'nr' : $XXX_DOES_NOT_EXIST})
endfunc
func Test_setqflist_user_sets_buftype()
diff --git a/src/nvim/testdir/test_sha256.vim b/src/nvim/testdir/test_sha256.vim
index dd4707977e..76d1306836 100644
--- a/src/nvim/testdir/test_sha256.vim
+++ b/src/nvim/testdir/test_sha256.vim
@@ -6,17 +6,17 @@ endif
function Test_sha256()
" test for empty string:
- call assert_equal(sha256(""), 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
+ call assert_equal('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', sha256(""))
"'test for 1 char:
- call assert_equal(sha256("a"), 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb')
+ call assert_equal('ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb', sha256("a"))
"
"test for 3 chars:
- call assert_equal(sha256("abc"), 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad')
+ call assert_equal('ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad', "abc"->sha256())
" test for contains meta char:
- call assert_equal(sha256("foo\nbar"), '807eff6267f3f926a21d234f7b0cf867a86f47e07a532f15e8cc39ed110ca776')
+ call assert_equal('807eff6267f3f926a21d234f7b0cf867a86f47e07a532f15e8cc39ed110ca776', sha256("foo\nbar"))
" test for contains non-ascii char:
- call assert_equal(sha256("\xde\xad\xbe\xef"), '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953')
+ call assert_equal('5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813953', sha256("\xde\xad\xbe\xef"))
endfunction
diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim
index b261b96c3b..9869dc7590 100644
--- a/src/nvim/testdir/test_tabpage.vim
+++ b/src/nvim/testdir/test_tabpage.vim
@@ -35,7 +35,7 @@ function Test_tabpage()
tabnew
tabfirst
call settabvar(2, 'val_num', 100)
- call settabvar(2, 'val_str', 'SetTabVar test')
+ eval 'SetTabVar test'->settabvar(2, 'val_str')
call settabvar(2, 'val_list', ['red', 'blue', 'green'])
"
call assert_true(gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test' && gettabvar(2, 'val_list') == ['red', 'blue', 'green'])
@@ -184,7 +184,7 @@ function Test_tabpage_with_autocmd()
let s:li = split(join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')), '\s\+')
call assert_equal(['a', 'a'], s:li)
let s:li = []
- C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
+ C call map(copy(winr), '(v:val*2)->settabwinvar(' .. tabn .. ', v:val, ''a'')')
let s:li = split(join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')), '\s\+')
call assert_equal(['2', '4'], s:li)
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim
index 15182893e9..2aa04df42a 100644
--- a/src/nvim/testdir/test_tagjump.vim
+++ b/src/nvim/testdir/test_tagjump.vim
@@ -351,7 +351,7 @@ func Test_getsettagstack()
" Try to set current index to invalid values
call settagstack(1, {'curidx' : -1})
call assert_equal(1, gettagstack().curidx)
- call settagstack(1, {'curidx' : 50})
+ eval {'curidx' : 50}->settagstack(1)
call assert_equal(4, gettagstack().curidx)
" Try pushing invalid items onto the stack
diff --git a/src/nvim/testdir/test_vartabs.vim b/src/nvim/testdir/test_vartabs.vim
index 2fbf130345..46e0d62313 100644
--- a/src/nvim/testdir/test_vartabs.vim
+++ b/src/nvim/testdir/test_vartabs.vim
@@ -330,7 +330,7 @@ func Test_vartabs_shiftwidth()
let lines = ScreenLines([1, 2], winwidth(0))
call s:compare_lines(expect2, lines)
call assert_equal(20, shiftwidth(virtcol('.')-2))
- call assert_equal(30, shiftwidth(virtcol('.')))
+ call assert_equal(30, virtcol('.')->shiftwidth())
norm! $>>
let expect3 = [' ', ' x ', '~ ']
let lines = ScreenLines([1, 3], winwidth(0))