test(old): emulate test_override('starting') with FFI (#34742)

I was initially trying to port several cmdline tests from Vim involving
test_override('char_avail') without having to rewrite entire tests in
Lua, but haven't figured out a good way achieve that yet. Nevertheless
emulating test_override('starting') is easier.

(cherry picked from commit 715c28d67f)
This commit is contained in:
zeertzjq
2025-07-03 19:21:58 +08:00
committed by github-actions[bot]
parent 0f81af53b0
commit b9dbdfef0e
4 changed files with 40 additions and 19 deletions

View File

@@ -3260,7 +3260,7 @@ endfunc
func Test_cclose_in_autocmd()
" Problem is only triggered if "starting" is zero, so that the OptionSet
" event will be triggered.
" call test_override('starting', 1)
call Ntest_override('starting', 1)
augroup QF_Test
au!
au FileType qf :call assert_fails(':cclose', 'E788')
@@ -3270,7 +3270,7 @@ func Test_cclose_in_autocmd()
au!
augroup END
augroup! QF_Test
" call test_override('starting', 0)
call Ntest_override('starting', 0)
endfunc
" Check that ":file" without an argument is possible even when "curbuf->b_ro_locked"