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:
- 7be7ec98a2
- https://github.com/neovim/neovim/issues/10270#issuecomment-531516948
This commit is contained in:
Jan Edmund Lazo 2019-09-15 07:32:34 -04:00
parent c65dd2d114
commit 36a1670151
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -31,12 +31,6 @@ let &packpath = &rtp
" Avoid storing shell history. " Avoid storing shell history.
let $HISTFILE = "" 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 " Use default shell on Windows to avoid segfault, caused by TUI
if has('win32') if has('win32')
let $SHELL = '' let $SHELL = ''
@ -45,3 +39,15 @@ if has('win32')
set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1 set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1
let &shellpipe = &shellredir let &shellpipe = &shellredir
endif 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