]> granicus.if.org Git - vim/commitdiff
patch 8.2.3495: GUI geometry startup test fails on some systems v8.2.3495
authorBram Moolenaar <Bram@vim.org>
Mon, 11 Oct 2021 15:08:32 +0000 (16:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 11 Oct 2021 15:08:32 +0000 (16:08 +0100)
Problem:    GUI geometry startup test fails on some systems. (Drew Vogel)
Solution:   Add tolerance to the size check. (closes #8815)

src/testdir/test_startup.vim
src/version.c

index dc320825c0c8dcccbb1bc168ba5928f8e96f4c43..b20954b25c352a13583ab37a84b4c0d02abbaa9a 100644 (file)
@@ -533,7 +533,14 @@ func Test_geometry()
     [CODE]
     if RunVim([], after, '-f -g -geometry 31x13+41+43')
       let lines = readfile('Xtest_geometry')
-      call assert_equal(['31', '13', '41', '43', '[41, 43]'], lines)
+      " Depending on the GUI library and the windowing system the final size
+      " might be a bit different, allow for some tolerance.  Tuned based on
+      " actual failures.
+      call assert_inrange(31, 35, lines[0])
+      call assert_equal(13, lines[1])
+      call assert_equal(41, lines[2])
+      call assert_equal(43, lines[3])
+      call assert_equal([41, 43], lines[4])
     endif
   endif
 
index f5c8d76a51b2a248e6846fba07873af830c23f45..2ef2946b48ec95cbd738b070a4392ce48b59868b 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3495,
 /**/
     3494,
 /**/