From 029f72b1a93430b24b88eb3a72c6114d9f149737 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:09:20 +0200 Subject: Adding upstream version 2:9.1.0016. Signed-off-by: Daniel Baumann --- src/testdir/setup.vim | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/testdir/setup.vim (limited to 'src/testdir/setup.vim') diff --git a/src/testdir/setup.vim b/src/testdir/setup.vim new file mode 100644 index 0000000..0e5088a --- /dev/null +++ b/src/testdir/setup.vim @@ -0,0 +1,43 @@ +" Common preparations for running tests. + +" Only load this once. +if 1 + + " When using xterm version 377 the response to the modifyOtherKeys status + " interferes with some tests. Remove the request from the t_TI termcap + " entry. + let &t_TI = substitute(&t_TI, "\\\[?4m", '', '') + + if exists('s:did_load') + finish + endif + let s:did_load = 1 +endif + +" Make sure 'runtimepath' and 'packpath' does not include $HOME. +set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after +if has('packages') + let &packpath = &rtp +endif + +" Only when the +eval feature is present. +if 1 + " Make sure the .Xauthority file can be found after changing $HOME. + if $XAUTHORITY == '' + let $XAUTHORITY = $HOME . '/.Xauthority' + endif + + " Avoid storing shell history. + let $HISTFILE = "" + + " Have current $HOME available as $ORIGHOME. $HOME is used for option + " defaults before we get here, and test_mksession checks that. + let $ORIGHOME = $HOME + + " Make sure $HOME does not get read or written. + " It must exist, gnome tries to create $HOME/.gnome2 + let $HOME = getcwd() . '/XfakeHOME' + if !isdirectory($HOME) + call mkdir($HOME) + endif +endif -- cgit v1.2.3