diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 22:40:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 22:49:32 +0800 |
commit | d745433817499c34ccf230469417fb0ea29b7ab9 (patch) | |
tree | 45c2be735fcb86152e098c264436c8a6f29e862f /test/old/testdir/test_functions.vim | |
parent | 4ecf6fdfd857b52c0bab9a8dbfc760364ac2677b (diff) | |
download | rneovim-d745433817499c34ccf230469417fb0ea29b7ab9.tar.gz rneovim-d745433817499c34ccf230469417fb0ea29b7ab9.tar.bz2 rneovim-d745433817499c34ccf230469417fb0ea29b7ab9.zip |
vim-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 vim/vim#12352)
https://github.com/vim/vim/commit/e4098457ab9c94225b1b0e3c5e06b82b75587971
It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r-- | test/old/testdir/test_functions.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index b934f7fac2..6ff21bc859 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -1096,6 +1096,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 @@ -1135,6 +1136,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 @@ -1495,6 +1497,7 @@ func Test_utf16idx_from_charidx() " error cases call assert_equal(-1, utf16idx(v:_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() |