fix(test): unset XDG_CONFIG_HOME when running oldtest

- also fix test_taglist.vim for users running with a tags file created
  in runtime/doc
This commit is contained in:
Lewis Russell
2023-01-27 09:48:00 +00:00
committed by GitHub
parent 843c9025ae
commit 9b43dcdbff
2 changed files with 5 additions and 2 deletions

View File

@@ -30,6 +30,9 @@ main() {(
. "$CI_DIR/common/suite.sh" . "$CI_DIR/common/suite.sh"
. "$CI_DIR/common/test.sh" . "$CI_DIR/common/test.sh"
# Redirect XDG_CONFIG_HOME so users local config doesn't interfere
export XDG_CONFIG_HOME="$root"
export VIMRUNTIME="$root/runtime" export VIMRUNTIME="$root/runtime"
if ! "$nvim_prg" \ if ! "$nvim_prg" \
-u NONE -i NONE \ -u NONE -i NONE \

View File

@@ -105,8 +105,8 @@ func Test_tagfiles()
help help
let tf = tagfiles() let tf = tagfiles()
" Nvim: expectation(s) based on tags in build dir (added to &rtp). " Nvim: expectation(s) based on tags in build dir (added to &rtp).
" Filter out the (non-existing) '../../../runtime/doc/tags'. " Filter out the '../../../runtime/doc/tags'.
call filter(tf, 'filereadable(v:val)') call filter(tf, 'v:val != "../../../runtime/doc/tags"')
call assert_equal(1, len(tf)) call assert_equal(1, len(tf))
call assert_equal(fnamemodify(expand('$BUILD_DIR/runtime/doc/tags'), ':p:gs?\\?/?'), call assert_equal(fnamemodify(expand('$BUILD_DIR/runtime/doc/tags'), ':p:gs?\\?/?'),
\ fnamemodify(tf[0], ':p:gs?\\?/?')) \ fnamemodify(tf[0], ':p:gs?\\?/?'))