patch 9.0.1522: some functions give two error messages
Problem: Some functions give two error messages.
Solution: Do not give a second error message. (closes #12352)
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index 4e02de0..b3a8c49 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -160,6 +160,8 @@
call assert_equal('edit', "editor"[-10 : 3])
END
call v9.CheckLegacyAndVim9Success(lines)
+
+ call assert_fails('echo strcharpart("", 0, 0, {})', ['E728:', 'E728:'])
endfunc
func Test_getreg_empty_list()
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 11cfcc9..f05ac15 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1224,6 +1224,7 @@
" 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:'])
endfunc
" Test for byteidxcomp() using a character index
@@ -1263,6 +1264,7 @@
" 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:'])
endfunc
" Test for byteidx() using a UTF-16 index
@@ -1623,6 +1625,7 @@
" 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()