diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:39:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 07:40:16 +0000 |
commit | 6af24b2457752c0d36aaf9f29f03d39afd09937f (patch) | |
tree | 2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/testdir/test_startup.vim | |
parent | Releasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff) | |
download | vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip |
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 1a81318..7c70391 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -518,18 +518,24 @@ func Test_geometry() call writefile([&columns, &lines, getwinposx(), getwinposy(), string(getwinpos())], "Xtest_geometry") qall [CODE] + " Hide menu because gtk insists to make the window wide enough to show it completely " Some window managers have a bar at the top that pushes windows down, " need to use at least 130, let's do 150 - if RunVim([], after, '-f -g -geometry 31x13+41+150') + if RunVim(['set guioptions-=m'], after, '-f -g -geometry 31x13+41+150') let lines = readfile('Xtest_geometry') " 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, str2nr(lines[0])) - call assert_equal('13', lines[1]) - call assert_equal('41', lines[2]) - call assert_equal('150', lines[3]) - call assert_equal('[41, 150]', lines[4]) + " for some reason, the window may contain fewer lines than requested + " for GTK, so allow some tolerance + call assert_inrange(8, 13, str2nr(lines[1])) + " on Wayland there is no way to set or retrieve window positions + if empty($WAYLAND_DISPLAY) + call assert_equal('41', lines[2]) + call assert_equal('150', lines[3]) + call assert_equal('[41, 150]', lines[4]) + endif endif endif |