0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.1132: getwinpos() test fails on MS-Windows

Problem:    getwinpos() test fails on MS-Windows.
Solution:   Don't try running this test.
This commit is contained in:
Bram Moolenaar
2019-04-06 22:21:22 +02:00
parent 16c34c3765
commit 616aeef21f
2 changed files with 10 additions and 11 deletions

View File

@@ -1889,6 +1889,10 @@ func Test_terminal_statusline()
endfunc endfunc
func Test_terminal_getwinpos() func Test_terminal_getwinpos()
if !CanRunVimInTerminal()
return
endif
" split, go to the bottom-right window " split, go to the bottom-right window
split split
wincmd j wincmd j
@@ -1907,17 +1911,10 @@ func Test_terminal_getwinpos()
let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', '')) let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', '')) let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
" getwinpos() in the MS-Windows console returns the screen position of the
" emulated console.
if has('win32')
call assert_inrange(0, 4000, xpos)
call assert_inrange(0, 2000, ypos)
else
" Position must be bigger than the getwinpos() result of Vim itself. " Position must be bigger than the getwinpos() result of Vim itself.
let [xroot, yroot] = getwinpos() let [xroot, yroot] = getwinpos()
call assert_inrange(xroot + 2, xroot + 1000, xpos) call assert_inrange(xroot + 2, xroot + 1000, xpos)
call assert_inrange(yroot + 2, yroot + 1000, ypos) call assert_inrange(yroot + 2, yroot + 1000, ypos)
endif
call term_wait(buf) call term_wait(buf)
call term_sendkeys(buf, ":q\<CR>") call term_sendkeys(buf, ":q\<CR>")

View File

@@ -771,6 +771,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 */
/**/
1132,
/**/ /**/
1131, 1131,
/**/ /**/