Skip to content

Commit 8caef44

Browse files
committed
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)
1 parent bedf091 commit 8caef44

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/testdir/test_winbar.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ if !has('menu')
44
finish
55
endif
66

7+
source shared.vim
8+
79
func Test_add_remove_menu()
810
new
911
amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
1012
amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
13+
redraw
14+
call assert_match('Next Cont', Screenline(1))
15+
1116
emenu WinBar.Next
1217
call assert_equal(11, g:did_next)
1318
emenu WinBar.Cont
@@ -28,6 +33,7 @@ func Test_click_in_winbar()
2833
amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
2934
amenu 1.30 WinBar.Close :close<CR>
3035
redraw
36+
call assert_match('Next Cont Close', Screenline(1))
3137

3238
let save_mouse = &mouse
3339
set mouse=a
@@ -38,7 +44,7 @@ func Test_click_in_winbar()
3844
let g:did_next = 0
3945
let g:did_cont = 0
4046
for col in [1, 8, 9, 16, 17, 25, 26]
41-
call test_setmouse(1, 1)
47+
call test_setmouse(1, col)
4248
call feedkeys("\<LeftMouse>", "xt")
4349
call assert_equal(0, g:did_next, 'col ' .. col)
4450
call assert_equal(0, g:did_cont, 'col ' .. col)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,8 @@ static char *(features[]) =
767767

768768
static int included_patches[] =
769769
{ /* Add new patch number below this line */
770+
/**/
771+
1266,
770772
/**/
771773
1265,
772774
/**/

0 commit comments

Comments
 (0)