aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-15 07:32:34 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-15 08:26:54 -0400
commit36a167015145b46bc043daac2d06c3dc5f8b8dbb (patch)
tree3e3abef7d839e2a53ef113f9ae0cfd3a5e335b1a
parentc65dd2d114b8a493b05e8b570a5dff6f696acd9c (diff)
downloadrneovim-36a167015145b46bc043daac2d06c3dc5f8b8dbb.tar.gz
rneovim-36a167015145b46bc043daac2d06c3dc5f8b8dbb.tar.bz2
rneovim-36a167015145b46bc043daac2d06c3dc5f8b8dbb.zip
test/old: detect user modules for python,ruby
Set the environment variables before changing $HOME so that python,ruby can find user modules not in $HOME. Reference: - https://github.com/neovim/neovim/commit/7be7ec98a22451ec75ce5eb9284fa1722b53c697 - https://github.com/neovim/neovim/issues/10270#issuecomment-531516948
-rw-r--r--src/nvim/testdir/setup.vim18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim
index f79fb9e518..ea28f328ae 100644
--- a/src/nvim/testdir/setup.vim
+++ b/src/nvim/testdir/setup.vim
@@ -31,12 +31,6 @@ let &packpath = &rtp
" Avoid storing shell history.
let $HISTFILE = ""
-" Make sure $HOME does not get read or written.
-let $HOME = expand(getcwd() . '/XfakeHOME')
-if !isdirectory($HOME)
- call mkdir($HOME)
-endif
-
" Use default shell on Windows to avoid segfault, caused by TUI
if has('win32')
let $SHELL = ''
@@ -45,3 +39,15 @@ if has('win32')
set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1
let &shellpipe = &shellredir
endif
+
+" Detect user modules for language providers
+let $PYTHONUSERBASE = $HOME . '/.local'
+if executable('gem')
+ let $GEM_PATH = system('gem env gempath')
+endif
+
+" Make sure $HOME does not get read or written.
+let $HOME = expand(getcwd() . '/XfakeHOME')
+if !isdirectory($HOME)
+ call mkdir($HOME)
+endif