Mercurial > vim
comparison src/testdir/test_match.vim @ 30015:adb0de8be4ce v9.0.0345
patch 9.0.0345: error message for list argument could be clearer
Commit: https://github.com/vim/vim/commit/d83392a43a48c566c0f3b76382a3648584dae32b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 1 12:22:46 2022 +0100
patch 9.0.0345: error message for list argument could be clearer
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/11027)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 01 Sep 2022 13:30:05 +0200 |
parents | 95d6e3c9aa1e |
children | 86683eee58ac |
comparison
equal
deleted
inserted
replaced
30014:3fb163e2ef6c | 30015:adb0de8be4ce |
---|---|
93 " --- (A range of valid and invalid input values are tried out to generate the | 93 " --- (A range of valid and invalid input values are tried out to generate the |
94 " --- return values.) | 94 " --- return values.) |
95 call assert_equal(0, setmatches([])) | 95 call assert_equal(0, setmatches([])) |
96 call assert_equal(0, setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])) | 96 call assert_equal(0, setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])) |
97 call clearmatches() | 97 call clearmatches() |
98 call assert_fails('call setmatches(0)', 'E714:') | 98 call assert_fails('call setmatches(0)', 'E1211:') |
99 call assert_fails('call setmatches([0])', 'E474:') | 99 call assert_fails('call setmatches([0])', 'E474:') |
100 call assert_fails("call setmatches([{'wrong key': 'wrong value'}])", 'E474:') | 100 call assert_fails("call setmatches([{'wrong key': 'wrong value'}])", 'E474:') |
101 call assert_equal(-1, setmatches([{'group' : 'Search', 'priority' : 10, 'id' : 5, 'pos1' : {}}])) | 101 call assert_equal(-1, setmatches([{'group' : 'Search', 'priority' : 10, 'id' : 5, 'pos1' : {}}])) |
102 | 102 |
103 call setline(1, 'abcdefghijklmnopq') | 103 call setline(1, 'abcdefghijklmnopq') |