diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-07 18:53:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-07 18:53:49 +0100 |
commit | e4098457ab9c94225b1b0e3c5e06b82b75587971 (patch) | |
tree | 549c60e0f17dde15e4a00ded6436e5e3309e112a /src/testdir | |
parent | 30b6d6104c3d541c41c868989c020b743e01af08 (diff) |
patch 9.0.1522: some functions give two error messagesv9.0.1522
Problem: Some functions give two error messages.
Solution: Do not give a second error message. (closes #12352)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_expr.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_functions.vim | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index 4e02de010a..b3a8c49c54 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -160,6 +160,8 @@ func Test_strcharpart() 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 11cfcc9536..f05ac15ed5 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -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() |