0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2023-05-07 18:53:49 +01:00
parent 30b6d6104c
commit e4098457ab
4 changed files with 21 additions and 6 deletions

View File

@@ -1224,6 +1224,7 @@ 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:'])
endfunc
" Test for byteidxcomp() using a character index
@@ -1263,6 +1264,7 @@ 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:'])
endfunc
" Test for byteidx() using a UTF-16 index
@@ -1623,6 +1625,7 @@ 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()