2016-07-12 22:51:22 +02:00
|
|
|
" Common preparations for running tests.
|
|
|
|
|
|
2017-07-29 22:21:18 +02:00
|
|
|
" Only load this once.
|
|
|
|
|
if 1
|
|
|
|
|
if exists('s:did_load')
|
|
|
|
|
finish
|
|
|
|
|
endif
|
|
|
|
|
let s:did_load = 1
|
|
|
|
|
endif
|
|
|
|
|
|
2016-08-06 19:01:55 +02:00
|
|
|
" Make sure 'runtimepath' and 'packpath' does not include $HOME.
|
2016-07-12 22:51:22 +02:00
|
|
|
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
|
2016-08-06 19:45:31 +02:00
|
|
|
if has('packages')
|
|
|
|
|
let &packpath = &rtp
|
|
|
|
|
endif
|
2016-07-12 22:51:22 +02:00
|
|
|
|
|
|
|
|
" Only when the +eval feature is present.
|
|
|
|
|
if 1
|
2017-07-08 17:03:21 +02:00
|
|
|
" Make sure the .Xauthority file can be found after changing $HOME.
|
|
|
|
|
if $XAUTHORITY == ''
|
|
|
|
|
let $XAUTHORITY = $HOME . '/.Xauthority'
|
|
|
|
|
endif
|
|
|
|
|
|
2017-09-03 14:31:02 +02:00
|
|
|
" Avoid storing shell history.
|
|
|
|
|
let $HISTFILE = ""
|
|
|
|
|
|
2016-07-12 22:51:22 +02:00
|
|
|
" Make sure $HOME does not get read or written.
|
2017-07-29 20:39:53 +02:00
|
|
|
" It must exist, gnome tries to create $HOME/.gnome2
|
|
|
|
|
let $HOME = getcwd() . '/XfakeHOME'
|
2017-07-30 13:28:23 +02:00
|
|
|
if !isdirectory($HOME)
|
|
|
|
|
call mkdir($HOME)
|
|
|
|
|
endif
|
2016-07-12 22:51:22 +02:00
|
|
|
endif
|