mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-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: vim/vim#156395b9237c2e7
Co-authored-by: John M Devin <john.m.devin@gmail.com> (cherry picked from commit0eb708aa8a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
cdd3f2a2e6
commit
b7de104d86
@@ -113,6 +113,10 @@ endif
|
|||||||
" defaults before we get here, and test_mksession checks that.
|
" defaults before we get here, and test_mksession checks that.
|
||||||
let $ORIGHOME = $HOME
|
let $ORIGHOME = $HOME
|
||||||
|
|
||||||
|
if !exists('$XDG_CONFIG_HOME')
|
||||||
|
let $XDG_CONFIG_HOME = $HOME .. '/.config'
|
||||||
|
endif
|
||||||
|
|
||||||
" Make sure $HOME does not get read or written.
|
" Make sure $HOME does not get read or written.
|
||||||
let $HOME = expand(getcwd() . '/XfakeHOME')
|
let $HOME = expand(getcwd() . '/XfakeHOME')
|
||||||
if !isdirectory($HOME)
|
if !isdirectory($HOME)
|
||||||
|
@@ -1205,7 +1205,10 @@ func Test_mkview_default_home()
|
|||||||
" use escape() to handle backslash path separators
|
" use escape() to handle backslash path separators
|
||||||
call assert_match('^' .. escape($ORIGHOME, '\') .. '/vimfiles', &viewdir)
|
call assert_match('^' .. escape($ORIGHOME, '\') .. '/vimfiles', &viewdir)
|
||||||
elseif has('unix')
|
elseif has('unix')
|
||||||
call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
|
call assert_match(
|
||||||
|
\ '^' .. $ORIGHOME .. '/.vim\|' ..
|
||||||
|
\ '^' .. $XDG_CONFIG_HOME .. '/vim'
|
||||||
|
\ , &viewdir)
|
||||||
elseif has('amiga')
|
elseif has('amiga')
|
||||||
call assert_match('^home:vimfiles', &viewdir)
|
call assert_match('^home:vimfiles', &viewdir)
|
||||||
elseif has('mac')
|
elseif has('mac')
|
||||||
|
Reference in New Issue
Block a user