summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-07 20:03:23 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-07 20:03:23 +0200
commit631820536e4084e01bf990f9314ec385b60b21d7 (patch)
tree3876a54cd74c3db491638cad387a43fbd857d2e7
parent73f4439ca690d8224df8f88dc71a43fafdcc89bf (diff)
patch 8.0.1179: Test_popup_and_window_resize() does not always passv8.0.1179
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)
-rw-r--r--.gitignore1
-rw-r--r--src/testdir/Makefile11
-rw-r--r--src/testdir/shared.vim16
-rw-r--r--src/testdir/test_popup.vim6
-rw-r--r--src/version.c2
5 files changed, 28 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 07adcb61a4..f31e233bb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@ src/pathdef.c
src/Obj*/pathdef.c
gvimext.dll
gvimext.lib
+gvim.lib
runtime/doc/uganda.nsis.txt
# Borland C++
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index ce1c24cd68..3a69c6c1ac 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -126,18 +126,21 @@ newtests: newtestssilent
newtestssilent: $(NEW_TESTS)
-.vim.res:
- @echo "$(RUN_VIMTEST)" > vimcmd
+.vim.res: writevimcmd
+ @echo "$(VIMPROG)" > vimcmd
+ @echo "$(RUN_VIMTEST)" >> vimcmd
$(RUN_VIMTEST) $(NO_INITS) -S runtest.vim $*.vim
@rm vimcmd
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 $<
@rm vimcmd
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 $<
@rm vimcmd
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index be83732cd2..8db388a4fa 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -170,6 +170,15 @@ func s:feedkeys(timer)
call feedkeys('x', 'nt')
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.
" If there is an argument use it instead of "NONE".
" Returns an empty string on error.
@@ -182,7 +191,12 @@ func GetVimCommand(...)
else
let name = a:1
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, '')
if cmd !~ '-u '. name
let cmd = cmd . ' -u ' . name
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index fdd51de51c..917395bc9b 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -643,10 +643,10 @@ func Test_popup_and_window_resize()
if h < 15
return
endif
- let g:buf = term_start([$VIMPROG, '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
- call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G")
- call term_sendkeys(g:buf, "i\<c-x>")
+ let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
+ call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>")
call term_wait(g:buf, 200)
+ call term_sendkeys(g:buf, "Gi\<c-x>")
call term_sendkeys(g:buf, "\<c-v>")
call term_wait(g:buf, 100)
" popup first entry "!" must be at the top
diff --git a/src/version.c b/src/version.c
index 95b4b30838..b021a25876 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1179,
+/**/
1178,
/**/
1177,