From: Bram Moolenaar Date: Sat, 4 May 2019 15:30:04 +0000 (+0200) Subject: patch 8.1.1266: winbar test doesn't test enough X-Git-Tag: v8.1.1266 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8caef443b2a71b937061399a216bcfa854aed33d;p=vim patch 8.1.1266: winbar test doesn't test enough Problem: Winbar test doesn't test enough. Solution: Check that the WinBar actually shows up. Correct check for clicks with no effect. (Ben Jackson, closes #4338) --- diff --git a/src/testdir/test_winbar.vim b/src/testdir/test_winbar.vim index fd44ac9bb..ada8f6ba2 100644 --- a/src/testdir/test_winbar.vim +++ b/src/testdir/test_winbar.vim @@ -4,10 +4,15 @@ if !has('menu') finish endif +source shared.vim + func Test_add_remove_menu() new amenu 1.10 WinBar.Next :let g:did_next = 11 amenu 1.20 WinBar.Cont :let g:did_cont = 12 + redraw + call assert_match('Next Cont', Screenline(1)) + emenu WinBar.Next call assert_equal(11, g:did_next) emenu WinBar.Cont @@ -28,6 +33,7 @@ func Test_click_in_winbar() amenu 1.20 WinBar.Cont :let g:did_cont = 12 amenu 1.30 WinBar.Close :close redraw + call assert_match('Next Cont Close', Screenline(1)) let save_mouse = &mouse set mouse=a @@ -38,7 +44,7 @@ func Test_click_in_winbar() let g:did_next = 0 let g:did_cont = 0 for col in [1, 8, 9, 16, 17, 25, 26] - call test_setmouse(1, 1) + call test_setmouse(1, col) call feedkeys("\", "xt") call assert_equal(0, g:did_next, 'col ' .. col) call assert_equal(0, g:did_cont, 'col ' .. col) diff --git a/src/version.c b/src/version.c index 3edde60bf..8458a8163 100644 --- a/src/version.c +++ b/src/version.c @@ -767,6 +767,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1266, /**/ 1265, /**/