diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-24 15:44:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-24 15:44:30 +0200 |
commit | dd0b287c1ec8314034a2dbb14c4267994c47520c (patch) | |
tree | a97d68b7b799f6addb4429acb89acc28c26f405e /src/testdir | |
parent | 88421d6dc812a2f3b0eab34740f174c9558cb734 (diff) | |
download | vim-git-dd0b287c1ec8314034a2dbb14c4267994c47520c.tar.gz |
patch 8.2.3210: Vim9: searchpair() sixth argument is compiledv8.2.3210
Problem: Vim9: searchpair() sixth argument is compiled. (Yegappan
Lakshmanan)
Solution: Only compile the fifth argument.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 6b64823f5..d983c34e0 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -2569,9 +2569,17 @@ def Test_searchpair() unlet g:caught lines =<< trim END - echo searchpair("a", "b", "c", "d", "1", "f") + echo searchpair("a", "b", "c", "d", "f", 33) END - CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:') + CheckDefAndScriptFailure2(lines, 'E1001: Variable not found: f', 'E475: Invalid argument: d') + + lines =<< trim END + def TestPair() + echo searchpair("a", "b", "c", "d", "1", "f") + enddef + defcompile + END + CheckScriptSuccess(lines) bwipe! enddef |