test(old): emulate test_override('char_avail') using FFI

Add a non-static variable for this, otherwise it'll be really hacky.
This avoid having to rewrite many incsearch tests in Lua.
This commit is contained in:
zeertzjq
2025-07-03 21:23:26 +08:00
parent bfffe0d214
commit c925e7b8ba
9 changed files with 106 additions and 107 deletions

View File

@@ -3096,16 +3096,15 @@ endfunc
" Test for incsearch highlighting of the :vimgrep pattern
" This test used to cause "E315: ml_get: invalid lnum" errors.
func Test_vimgrep_incsearch()
CheckFunction test_override
enew
set incsearch
call test_override("char_avail", 1)
call Ntest_override("char_avail", 1)
call feedkeys(":2vimgrep assert test_quickfix.vim test_cdo.vim\<CR>", "ntx")
let l = getqflist()
call assert_equal(2, len(l))
call test_override("ALL", 0)
call Ntest_override("ALL", 0)
set noincsearch
endfunc