Skip to content

Commit 5b9237c

Browse files
jmdevinchrisbra
authored andcommitted
patch 9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOME
Problem: tests: test_mksession does not consider XDG_CONFIG_HOME Solution: allow to match $HOME/.vim/ and $HOME/.config/vim for &viewdir (John M Devin) closes: #15639 Signed-off-by: John M Devin <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 609599c commit 5b9237c

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/testdir/setup.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ if 1
3434
" defaults before we get here, and test_mksession checks that.
3535
let $ORIGHOME = $HOME
3636

37+
if !exists('$XDG_CONFIG_HOME')
38+
let $XDG_CONFIG_HOME = $HOME .. '/.config'
39+
endif
40+
3741
" Make sure $HOME does not get read or written.
3842
" It must exist, gnome tries to create $HOME/.gnome2
3943
let $HOME = getcwd() . '/XfakeHOME'

src/testdir/test_mksession.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,10 @@ func Test_mkview_default_home()
12701270
" use escape() to handle backslash path separators
12711271
call assert_match('^' .. escape($ORIGHOME, '\') .. '/vimfiles', &viewdir)
12721272
elseif has('unix')
1273-
call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
1273+
call assert_match(
1274+
\ '^' .. $ORIGHOME .. '/.vim\|' ..
1275+
\ '^' .. $XDG_CONFIG_HOME .. '/vim'
1276+
\ , &viewdir)
12741277
elseif has('amiga')
12751278
call assert_match('^home:vimfiles', &viewdir)
12761279
elseif has('mac')

src/version.c

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

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
721,
707709
/**/
708710
720,
709711
/**/

0 commit comments

Comments
 (0)