]> granicus.if.org Git - vim/commitdiff
patch 8.1.1132: getwinpos() test fails on MS-Windows v8.1.1132
authorBram Moolenaar <Bram@vim.org>
Sat, 6 Apr 2019 20:21:22 +0000 (22:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 6 Apr 2019 20:21:22 +0000 (22:21 +0200)
Problem:    getwinpos() test fails on MS-Windows.
Solution:   Don't try running this test.

src/testdir/test_terminal.vim
src/version.c

index cbde579c88fe3fa18be6a416b328889224ab7c3b..e6ae7e25a5eb77ee795e715748f1a790437c05c9 100644 (file)
@@ -1889,6 +1889,10 @@ func Test_terminal_statusline()
 endfunc
 
 func Test_terminal_getwinpos()
+  if !CanRunVimInTerminal()
+    return
+  endif
+
   " split, go to the bottom-right window
   split
   wincmd j
@@ -1907,17 +1911,10 @@ func Test_terminal_getwinpos()
   let xpos = 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.
-    let [xroot, yroot] = getwinpos()
-    call assert_inrange(xroot + 2, xroot + 1000, xpos)
-    call assert_inrange(yroot + 2, yroot + 1000, ypos)
-  endif
+  " Position must be bigger than the getwinpos() result of Vim itself.
+  let [xroot, yroot] = getwinpos()
+  call assert_inrange(xroot + 2, xroot + 1000, xpos)
+  call assert_inrange(yroot + 2, yroot + 1000, ypos)
 
   call term_wait(buf)
   call term_sendkeys(buf, ":q\<CR>")
index 1fa1e8e6f1f14873ac8d808611a485929e513e22..47c9e33698b23ac1980ae37c6974a3d506f74868 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1132,
 /**/
     1131,
 /**/