Skip to content

Commit 50fa8dd

Browse files
committed
patch 7.4.2190
Problem: When startup test fails it's not easy to find out why. GUI test fails with Gnome. Solution: Add the help entry matches to a list an assert that. Set $HOME for Gnome to create .gnome2 directory.
1 parent f71d7b9 commit 50fa8dd

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

src/testdir/test_gui.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ func SetUp()
99
if has("gui_kde")
1010
set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
1111
endif
12+
13+
" Gnome insists on creating $HOME/.gnome2/..
14+
call mkdir('Xhome')
15+
let $HOME = fnamemodify('Xhome', ':p')
16+
endfunc
17+
18+
func TearDown()
19+
call delete('Xhome', 'rf')
1220
endfunc
1321

1422
" Test for resetting "secure" flag after GUI has started.

src/testdir/test_startup.vim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,17 @@ func Test_help_arg()
7272
call assert_match('Vi IMproved', lines[0])
7373

7474
" check if couple of lines are there
75-
let found = 0
75+
let found = []
7676
for line in lines
7777
if line =~ '-R.*Readonly mode'
78-
let found += 1
78+
call add(found, 'Readonly mode')
7979
endif
80-
if line =~ '--version'
81-
let found += 1
80+
" Watch out for a second --version line in the Gnome version.
81+
if line =~ '--version.*Print version information and exit'
82+
call add(found, "--version")
8283
endif
8384
endfor
84-
call assert_equal(2, found)
85+
call assert_equal(['Readonly mode', '--version'], found)
8586
endif
8687
call delete('Xtestout')
8788
endfunc

src/version.c

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

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2190,
766768
/**/
767769
2189,
768770
/**/

0 commit comments

Comments
 (0)