aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-08 23:17:28 +0800
committerGitHub <noreply@github.com>2023-05-08 23:17:28 +0800
commit71424a8a0e42ce56bbe3a4319764a8c32f1f511f (patch)
tree51c6d88e710a4fe5b66e4ac76e68657c08872b07 /test
parent9753cda591e2fceaaeea26bdf2d5b5d874d7e9f5 (diff)
parent625926f729137658d0a8a73a55aeefc5583488c3 (diff)
downloadrneovim-71424a8a0e42ce56bbe3a4319764a8c32f1f511f.tar.gz
rneovim-71424a8a0e42ce56bbe3a4319764a8c32f1f511f.tar.bz2
rneovim-71424a8a0e42ce56bbe3a4319764a8c32f1f511f.zip
Merge pull request #23540 from zeertzjq/vim-9.0.1522
vim-patch:9.0.{1522,1524}: some functions give two error messages
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_expr.vim3
-rw-r--r--test/old/testdir/test_functions.vim4
-rw-r--r--test/old/testdir/test_utf8.vim6
3 files changed, 11 insertions, 2 deletions
diff --git a/test/old/testdir/test_expr.vim b/test/old/testdir/test_expr.vim
index 9e089d50b8..4cb8da8c74 100644
--- a/test/old/testdir/test_expr.vim
+++ b/test/old/testdir/test_expr.vim
@@ -154,6 +154,9 @@ func Test_strcharpart()
call assert_equal('edit', "editor"[-10 : 3])
END
call CheckLegacyAndVim9Success(lines)
+
+ call assert_fails('call strcharpart("", 0, 0, {})', ['E728:', 'E728:'])
+ call assert_fails('call strcharpart("", 0, 0, -1)', ['E1023:', 'E1023:'])
endfunc
func Test_getreg_empty_list()
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index b934f7fac2..41a8610893 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -1096,6 +1096,8 @@ func Test_byteidx()
" error cases
call assert_fails("call byteidx([], 0)", 'E730:')
call assert_fails("call byteidx('abc', [])", 'E745:')
+ call assert_fails("call byteidx('abc', 0, {})", ['E728:', 'E728:'])
+ call assert_fails("call byteidx('abc', 0, -1)", ['E1023:', 'E1023:'])
endfunc
" Test for byteidxcomp() using a character index
@@ -1135,6 +1137,8 @@ func Test_byteidxcomp()
" error cases
call assert_fails("call byteidxcomp([], 0)", 'E730:')
call assert_fails("call byteidxcomp('abc', [])", 'E745:')
+ call assert_fails("call byteidxcomp('abc', 0, {})", ['E728:', 'E728:'])
+ call assert_fails("call byteidxcomp('abc', 0, -1)", ['E1023:', 'E1023:'])
endfunc
" Test for byteidx() using a UTF-16 index
diff --git a/test/old/testdir/test_utf8.vim b/test/old/testdir/test_utf8.vim
index e5f6d68720..00b060a9e2 100644
--- a/test/old/testdir/test_utf8.vim
+++ b/test/old/testdir/test_utf8.vim
@@ -29,8 +29,10 @@ func Test_strchars()
call assert_equal(exp[i], strcharlen(inp[i]))
endfor
- call assert_fails("let v=strchars('abc', [])", 'E745:')
- call assert_fails("let v=strchars('abc', 2)", 'E1023:')
+ call assert_fails("call strchars('abc', 2)", ['E1023:', 'E1023:'])
+ call assert_fails("call strchars('abc', -1)", ['E1023:', 'E1023:'])
+ call assert_fails("call strchars('abc', {})", ['E728:', 'E728:'])
+ call assert_fails("call strchars('abc', [])", ['E745:', 'E745:'])
endfunc
" Test for customlist completion