]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOME v9.1.0721
authorJohn M Devin <john.m.devin@gmail.com>
Sun, 8 Sep 2024 18:00:38 +0000 (20:00 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 8 Sep 2024 18:00:38 +0000 (20:00 +0200)
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>
src/testdir/setup.vim
src/testdir/test_mksession.vim
src/version.c

index 0e5088ad2438479cd7ee2952468810e212c3ab13..485675aa33506432a01fc356f54bac66f5019523 100644 (file)
@@ -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'
index 914d1e3a4aaf741a406076f208f693c3796e4455..d0ee6e8a7950e9a848e316127808e10ec642f6c1 100644 (file)
@@ -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')
index 5c3c5efb66de5bead09b338a2dd1b6ed954abffb..eb88b0d9147550f77ef64cb76a42235576e05e99 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    721,
 /**/
     720,
 /**/