diff src/testdir/test_vim9_builtin.vim @ 24606:a4fda40e0bb9 v8.2.2842

patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled Commit: https://github.com/vim/vim/commit/f18332fb9e2e4208a97d800f096b02c6681780e7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 7 17:55:55 2021 +0200 patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled Problem: Vim9: skip argument to searchpair() is not compiled. Solution: Add VAR_INSTR.
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 May 2021 18:00:04 +0200
parents abc4793f48a3
children cb031f421ece
line wrap: on
line diff
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -974,6 +974,20 @@ def Test_searchcount()
   bwipe!
 enddef
 
+def Test_searchpair()
+  new
+  setline(1, "here { and } there")
+  normal f{
+  var col = 15
+  assert_equal(1, searchpair('{', '', '}', '', 'col(".") > col'))
+  assert_equal(12, col('.'))
+  col = 8
+  normal 0f{
+  assert_equal(0, searchpair('{', '', '}', '', 'col(".") > col'))
+  assert_equal(6, col('.'))
+  bwipe!
+enddef
+
 def Test_set_get_bufline()
   # similar to Test_setbufline_getbufline()
   var lines =<< trim END