diff options
author | John M Devin <john.m.devin@gmail.com> | 2024-09-08 20:00:38 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-09-08 20:00:38 +0200 |
commit | 5b9237c2e7613f126f95e26056f55024af759102 (patch) | |
tree | 46848c147bba425c6ed89cc6d912b90bb7a3a362 | |
parent | 609599cc45f871dfda6e75bbacd53cd0ed79d5f1 (diff) |
patch 9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOMEv9.1.0721
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 <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | src/testdir/setup.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_mksession.vim | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/testdir/setup.vim b/src/testdir/setup.vim index 0e5088ad24..485675aa33 100644 --- a/src/testdir/setup.vim +++ b/src/testdir/setup.vim @@ -34,6 +34,10 @@ if 1 " defaults before we get here, and test_mksession checks that. let $ORIGHOME = $HOME + if !exists('$XDG_CONFIG_HOME') + let $XDG_CONFIG_HOME = $HOME .. '/.config' + endif + " Make sure $HOME does not get read or written. " It must exist, gnome tries to create $HOME/.gnome2 let $HOME = getcwd() . '/XfakeHOME' diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim index 914d1e3a4a..d0ee6e8a79 100644 --- a/src/testdir/test_mksession.vim +++ b/src/testdir/test_mksession.vim @@ -1270,7 +1270,10 @@ func Test_mkview_default_home() " use escape() to handle backslash path separators call assert_match('^' .. escape($ORIGHOME, '\') .. '/vimfiles', &viewdir) elseif has('unix') - call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir) + call assert_match( + \ '^' .. $ORIGHOME .. '/.vim\|' .. + \ '^' .. $XDG_CONFIG_HOME .. '/vim' + \ , &viewdir) elseif has('amiga') call assert_match('^home:vimfiles', &viewdir) elseif has('mac') diff --git a/src/version.c b/src/version.c index 5c3c5efb66..eb88b0d914 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 721, +/**/ 720, /**/ 719, |