patch 9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOME
Commit:
https://github.com/vim/vim/commit/5b9237c2e7613f126f95e26056f55024af759102
Author: John M Devin <[email protected]>
Date: Sun Sep 8 20:00:38 2024 +0200
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]>
diff --git a/src/testdir/setup.vim b/src/testdir/setup.vim
index 0e5088ad2..485675aa3 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 914d1e3a4..d0ee6e8a7 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 5c3c5efb6..eb88b0d91 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 721,
/**/
720,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1snMRE-0033Ny-ES%40256bit.org.