summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_expr.vim3
-rw-r--r--src/testdir/test_functions.vim3
-rw-r--r--src/testdir/test_utf8.vim6
3 files changed, 8 insertions, 4 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index b3a8c49c5..68cbeb59d 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -161,7 +161,8 @@ func Test_strcharpart()
END
call v9.CheckLegacyAndVim9Success(lines)
- call assert_fails('echo strcharpart("", 0, 0, {})', ['E728:', 'E728:'])
+ 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/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index f05ac15ed..4529a5e8d 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1225,6 +1225,7 @@ func Test_byteidx()
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
@@ -1265,6 +1266,7 @@ func Test_byteidxcomp()
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
@@ -1625,7 +1627,6 @@ func Test_utf16idx_from_charidx()
" error cases
call assert_equal(-1, utf16idx(test_null_string(), 0, v:true, v:true))
call assert_fails('let l = utf16idx("ab", 0, v:false, [])', 'E1212:')
- call assert_fails('echo strchars("", {})', ['E728:', 'E728:'])
endfunc
" Test for strutf16len()
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim
index 16bf60d9e..610566fd6 100644
--- a/src/testdir/test_utf8.vim
+++ b/src/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