mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 8.2.2582: Vim9: screendump test fails on MS-Windows
Problem: Vim9: screendump test fails on MS-Windows. Solution: Use :function instead of :def.
This commit is contained in:
parent
37294bd6a2
commit
ffb7dcdb77
@ -3339,35 +3339,37 @@ def Test_restoring_cpo()
|
|||||||
set cpo&vim
|
set cpo&vim
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_no_redraw_when_restoring_cpo()
|
" Use :function so we can use Check commands
|
||||||
|
func Test_no_redraw_when_restoring_cpo()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
CheckFeature timers
|
||||||
|
|
||||||
var lines =<< trim END
|
let lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
def script#func()
|
def script#func()
|
||||||
enddef
|
enddef
|
||||||
END
|
END
|
||||||
mkdir('Xdir/autoload', 'p')
|
call mkdir('Xdir/autoload', 'p')
|
||||||
writefile(lines, 'Xdir/autoload/script.vim')
|
call writefile(lines, 'Xdir/autoload/script.vim')
|
||||||
|
|
||||||
lines =<< trim END
|
let lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
set cpo+=M
|
set cpo+=M
|
||||||
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
||||||
au CmdlineEnter : ++once timer_start(0, () => script#func())
|
au CmdlineEnter : ++once timer_start(0, () => script#func())
|
||||||
setline(1, 'some text')
|
setline(1, 'some text')
|
||||||
END
|
END
|
||||||
writefile(lines, 'XTest_redraw_cpo')
|
call writefile(lines, 'XTest_redraw_cpo')
|
||||||
var buf = RunVimInTerminal('-S XTest_redraw_cpo', {'rows': 6})
|
let buf = RunVimInTerminal('-S XTest_redraw_cpo', {'rows': 6})
|
||||||
term_sendkeys(buf, "V:")
|
call term_sendkeys(buf, "V:")
|
||||||
VerifyScreenDump(buf, 'Test_vim9_no_redraw', {})
|
call VerifyScreenDump(buf, 'Test_vim9_no_redraw', {})
|
||||||
|
|
||||||
# clean up
|
" clean up
|
||||||
term_sendkeys(buf, "\<Esc>u")
|
call term_sendkeys(buf, "\<Esc>u")
|
||||||
StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
delete('XTest_redraw_cpo')
|
call delete('XTest_redraw_cpo')
|
||||||
delete('Xdir', 'rf')
|
call delete('Xdir', 'rf')
|
||||||
enddef
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
def Test_unset_any_variable()
|
def Test_unset_any_variable()
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2582,
|
||||||
/**/
|
/**/
|
||||||
2581,
|
2581,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user