aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-25 23:39:15 +0800
committerGitHub <noreply@github.com>2023-04-25 23:39:15 +0800
commit7e0d66801297677ecbb6b35d0c9139e672920be4 (patch)
tree74a2df0aa302d7d0b6b1084b4f54a365c0b0205b /test
parentac9f8669a8e4bd0cf13468d316d1746be65d3cdc (diff)
downloadrneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.tar.gz
rneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.tar.bz2
rneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.zip
vim-patch:partial:9.0.0359: error message for wrong argument type is not specific (#23315)
Problem: Error message for wrong argument type is not specific. Solution: Include more information in the error. (Yegappan Lakshmanan, closes vim/vim#11037) https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b Skip reduce() and deepcopy() changes because of missing patches. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_assert.vim10
-rw-r--r--test/old/testdir/test_cmdline.vim2
-rw-r--r--test/old/testdir/test_functions.vim14
-rw-r--r--test/old/testdir/test_signs.vim2
-rw-r--r--test/old/testdir/test_tagjump.vim2
-rw-r--r--test/old/testdir/test_timers.vim4
6 files changed, 22 insertions, 12 deletions
diff --git a/test/old/testdir/test_assert.vim b/test/old/testdir/test_assert.vim
index 431908e95c..4386492339 100644
--- a/test/old/testdir/test_assert.vim
+++ b/test/old/testdir/test_assert.vim
@@ -337,6 +337,16 @@ func Test_assert_with_msg()
call remove(v:errors, 0)
endfunc
+func Test_override()
+ throw 'Skipped: Nvim does not support test_override()'
+ call test_override('char_avail', 1)
+ eval 1->test_override('redraw')
+ call test_override('ALL', 0)
+ call assert_fails("call test_override('xxx', 1)", 'E475:')
+ call assert_fails("call test_override('redraw', 'yes')", 'E474:')
+ call assert_fails("call test_override('redraw', 'yes')", 'E1210:')
+endfunc
+
func Test_mouse_position()
let save_mouse = &mouse
set mouse=a
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim
index 9d506a66c0..9ed49b44c0 100644
--- a/test/old/testdir/test_cmdline.vim
+++ b/test/old/testdir/test_cmdline.vim
@@ -652,7 +652,7 @@ func Test_getcompletion()
call assert_fails("call getcompletion('\\\\@!\\\\@=', 'buffer')", 'E871:')
call assert_fails('call getcompletion("", "burp")', 'E475:')
- call assert_fails('call getcompletion("abc", [])', 'E475:')
+ call assert_fails('call getcompletion("abc", [])', 'E1174:')
endfunc
" Test for getcompletion() with "fuzzy" in 'wildoptions'
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index 0dd780e3fb..99ba711d23 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -1115,11 +1115,11 @@ func Test_charidx()
call assert_equal(-1, charidx(a, 8, 1))
call assert_equal(-1, charidx('', 0, 1))
- call assert_fails('let x = charidx([], 1)', 'E474:')
- call assert_fails('let x = charidx("abc", [])', 'E474:')
- call assert_fails('let x = charidx("abc", 1, [])', 'E474:')
- call assert_fails('let x = charidx("abc", 1, -1)', 'E1023:')
- call assert_fails('let x = charidx("abc", 1, 2)', 'E1023:')
+ call assert_fails('let x = charidx([], 1)', 'E1174:')
+ call assert_fails('let x = charidx("abc", [])', 'E1210:')
+ call assert_fails('let x = charidx("abc", 1, [])', 'E1212:')
+ call assert_fails('let x = charidx("abc", 1, -1)', 'E1212:')
+ call assert_fails('let x = charidx("abc", 1, 2)', 'E1212:')
endfunc
func Test_count()
@@ -1605,7 +1605,7 @@ func Test_trim()
call assert_fails('eval trim(" vim ", " ", [])', 'E745:')
call assert_fails('eval trim(" vim ", " ", -1)', 'E475:')
call assert_fails('eval trim(" vim ", " ", 3)', 'E475:')
- call assert_fails('eval trim(" vim ", 0)', 'E475:')
+ call assert_fails('eval trim(" vim ", 0)', 'E1174:')
let chars = join(map(range(1, 0x20) + [0xa0], {n -> n->nr2char()}), '')
call assert_equal("x", trim(chars . "x" . chars))
@@ -2567,7 +2567,7 @@ endfunc
" Test for gettext()
func Test_gettext()
- call assert_fails('call gettext(1)', 'E475:')
+ call assert_fails('call gettext(1)', 'E1174:')
endfunc
func Test_builtin_check()
diff --git a/test/old/testdir/test_signs.vim b/test/old/testdir/test_signs.vim
index 9ecbde0f30..1e972371a5 100644
--- a/test/old/testdir/test_signs.vim
+++ b/test/old/testdir/test_signs.vim
@@ -700,7 +700,7 @@ func Test_sign_group()
call assert_equal([], sign_getplaced(bnum, {'group' : '*'})[0].signs)
" Error case
- call assert_fails("call sign_unplace({})", 'E474:')
+ call assert_fails("call sign_unplace({})", 'E1174:')
" Place a sign in the global group and try to delete it using a group
call assert_equal(5, sign_place(5, '', 'sign1', bnum, {'lnum' : 10}))
diff --git a/test/old/testdir/test_tagjump.vim b/test/old/testdir/test_tagjump.vim
index 3c646048f5..f330bca125 100644
--- a/test/old/testdir/test_tagjump.vim
+++ b/test/old/testdir/test_tagjump.vim
@@ -407,7 +407,7 @@ func Test_getsettagstack()
call assert_equal(-1, settagstack(100, {'items' : []}))
call assert_fails('call settagstack(1, [1, 10])', 'E1206:')
call assert_fails("call settagstack(1, {'items' : 10})", 'E714:')
- call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E928:')
+ call assert_fails("call settagstack(1, {'items' : []}, 10)", 'E1174:')
call assert_fails("call settagstack(1, {'items' : []}, 'b')", 'E962:')
call assert_equal(-1, settagstack(0, v:_null_dict))
diff --git a/test/old/testdir/test_timers.vim b/test/old/testdir/test_timers.vim
index b5781748bc..37226c7efb 100644
--- a/test/old/testdir/test_timers.vim
+++ b/test/old/testdir/test_timers.vim
@@ -93,7 +93,7 @@ func Test_timer_info()
call timer_stop(id)
call assert_equal([], timer_info(id))
- call assert_fails('call timer_info("abc")', 'E39:')
+ call assert_fails('call timer_info("abc")', 'E1210:')
" check repeat count inside the callback
let g:timer_repeat = []
@@ -236,7 +236,7 @@ func Test_timer_errors()
call assert_fails('call timer_start(100, "MyHandler", "abc")', 'E1206:')
call assert_fails('call timer_start(100, [])', 'E921:')
- call assert_fails('call timer_stop("abc")', 'E39:')
+ call assert_fails('call timer_stop("abc")', 'E1210:')
endfunc
func FuncWithCaughtError(timer)