mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Problem: Test_popup_and_window_resize() does not always pass. Solution: Do not use $VIMPROG, pass the Vim executable in the vimcmd file. (Ozaki Kiichi, closes #2186)
This commit is contained in:
parent
73f4439ca6
commit
631820536e
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,6 +38,7 @@ src/pathdef.c
|
|||||||
src/Obj*/pathdef.c
|
src/Obj*/pathdef.c
|
||||||
gvimext.dll
|
gvimext.dll
|
||||||
gvimext.lib
|
gvimext.lib
|
||||||
|
gvim.lib
|
||||||
runtime/doc/uganda.nsis.txt
|
runtime/doc/uganda.nsis.txt
|
||||||
|
|
||||||
# Borland C++
|
# Borland C++
|
||||||
|
@ -126,18 +126,21 @@ newtests: newtestssilent
|
|||||||
newtestssilent: $(NEW_TESTS)
|
newtestssilent: $(NEW_TESTS)
|
||||||
|
|
||||||
|
|
||||||
.vim.res:
|
.vim.res: writevimcmd
|
||||||
@echo "$(RUN_VIMTEST)" > vimcmd
|
@echo "$(VIMPROG)" > vimcmd
|
||||||
|
@echo "$(RUN_VIMTEST)" >> vimcmd
|
||||||
$(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim
|
$(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim
|
||||||
@rm vimcmd
|
@rm vimcmd
|
||||||
|
|
||||||
test_gui.res: test_gui.vim
|
test_gui.res: test_gui.vim
|
||||||
@echo "$(RUN_GVIMTEST)" > vimcmd
|
@echo "$(VIMPROG)" > vimcmd
|
||||||
|
@echo "$(RUN_GVIMTEST)" >> vimcmd
|
||||||
$(RUN_VIMTEST) -u NONE $(NO_INITS) -S runtest.vim $<
|
$(RUN_VIMTEST) -u NONE $(NO_INITS) -S runtest.vim $<
|
||||||
@rm vimcmd
|
@rm vimcmd
|
||||||
|
|
||||||
test_gui_init.res: test_gui_init.vim
|
test_gui_init.res: test_gui_init.vim
|
||||||
@echo "$(RUN_GVIMTEST_WITH_GVIMRC)" > vimcmd
|
@echo "$(VIMPROG)" > vimcmd
|
||||||
|
@echo "$(RUN_GVIMTEST_WITH_GVIMRC)" >> vimcmd
|
||||||
$(RUN_VIMTEST) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
|
$(RUN_VIMTEST) -u gui_preinit.vim -U gui_init.vim $(NO_PLUGINS) -S runtest.vim $<
|
||||||
@rm vimcmd
|
@rm vimcmd
|
||||||
|
|
||||||
|
@ -170,6 +170,15 @@ func s:feedkeys(timer)
|
|||||||
call feedkeys('x', 'nt')
|
call feedkeys('x', 'nt')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Get $VIMPROG to run Vim executable.
|
||||||
|
" The Makefile writes it as the first line in the "vimcmd" file.
|
||||||
|
func GetVimProg()
|
||||||
|
if !filereadable('vimcmd')
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
return readfile('vimcmd')[0]
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Get the command to run Vim, with -u NONE and --not-a-term arguments.
|
" Get the command to run Vim, with -u NONE and --not-a-term arguments.
|
||||||
" If there is an argument use it instead of "NONE".
|
" If there is an argument use it instead of "NONE".
|
||||||
" Returns an empty string on error.
|
" Returns an empty string on error.
|
||||||
@ -182,7 +191,12 @@ func GetVimCommand(...)
|
|||||||
else
|
else
|
||||||
let name = a:1
|
let name = a:1
|
||||||
endif
|
endif
|
||||||
let cmd = readfile('vimcmd')[0]
|
" For Unix Makefile writes the command to use in the second line of the
|
||||||
|
" "vimcmd" file, including environment options.
|
||||||
|
" Other Makefiles just write the executable in the first line, so fall back
|
||||||
|
" to that if there is no second line.
|
||||||
|
let lines = readfile('vimcmd')
|
||||||
|
let cmd = get(lines, 1, lines[0])
|
||||||
let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '')
|
let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '')
|
||||||
if cmd !~ '-u '. name
|
if cmd !~ '-u '. name
|
||||||
let cmd = cmd . ' -u ' . name
|
let cmd = cmd . ' -u ' . name
|
||||||
|
@ -643,10 +643,10 @@ func Test_popup_and_window_resize()
|
|||||||
if h < 15
|
if h < 15
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let g:buf = term_start([$VIMPROG, '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
|
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
|
||||||
call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G")
|
call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>")
|
||||||
call term_sendkeys(g:buf, "i\<c-x>")
|
|
||||||
call term_wait(g:buf, 200)
|
call term_wait(g:buf, 200)
|
||||||
|
call term_sendkeys(g:buf, "Gi\<c-x>")
|
||||||
call term_sendkeys(g:buf, "\<c-v>")
|
call term_sendkeys(g:buf, "\<c-v>")
|
||||||
call term_wait(g:buf, 100)
|
call term_wait(g:buf, 100)
|
||||||
" popup first entry "!" must be at the top
|
" popup first entry "!" must be at the top
|
||||||
|
@ -761,6 +761,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 */
|
||||||
|
/**/
|
||||||
|
1179,
|
||||||
/**/
|
/**/
|
||||||
1178,
|
1178,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user