vim-patch:8.2.3495: GUI geometry startup test fails on some systems

Problem:    GUI geometry startup test fails on some systems. (Drew Vogel)
Solution:   Add tolerance to the size check. (closes vim/vim#8815)

b376aa2da4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2022-12-05 09:52:34 +08:00
parent e9ad613fdf
commit 78fa1f069d

View File

@ -522,7 +522,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