patch 8.0.1539: no test for the popup menu positioning
Problem: No test for the popup menu positioning.
Solution: Add a screendump test for the popup menu.
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index a28cb8c..584f9ac 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -1,10 +1,23 @@
" Functions shared by tests making screen dumps.
" Only load this script once.
-if exists('*RunVimInTerminal')
+if exists('*CanRunVimInTerminal')
finish
endif
+" Need to be able to run terminal Vim with 256 colors. On MS-Windows the
+" console only has 16 colors and the GUI can't run in a terminal.
+if !has('terminal') || has('win32')
+ func CanRunVimInTerminal()
+ return 0
+ endfunc
+ finish
+endif
+
+func CanRunVimInTerminal()
+ return 1
+endfunc
+
source shared.vim
" Run Vim with "arguments" in a new terminal window.
@@ -41,16 +54,17 @@
endfunc
" Verify that Vim running in terminal buffer "buf" matches the screen dump.
+" "options" is passed to term_dumpwrite().
" The file name used is "dumps/{filename}.dump".
" Will wait for up to a second for the screen dump to match.
-func VerifyScreenDump(buf, filename)
+func VerifyScreenDump(buf, filename, options)
let reference = 'dumps/' . a:filename . '.dump'
let testfile = a:filename . '.dump.failed'
let i = 0
while 1
call delete(testfile)
- call term_dumpwrite(a:buf, testfile)
+ call term_dumpwrite(a:buf, testfile, a:options)
if readfile(reference) == readfile(testfile)
call delete(testfile)
break