Mercurial > vim
annotate src/testdir/setup.vim @ 11852:825a4717f14a v8.0.0806
patch 8.0.0806: tests may try to create XfakeHOME twice
commit https://github.com/vim/vim/commit/f98246d4849e670c6660e97887428dcddf88dc9f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 29 22:21:18 2017 +0200
patch 8.0.0806: tests may try to create XfakeHOME twice
Problem: Tests may try to create XfakeHOME twice.
Solution: Avoid loading setup.vim twice.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 29 Jul 2017 22:30:04 +0200 |
parents | eb339f9af281 |
children | 4276e114b34a |
rev | line source |
---|---|
9501
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Common preparations for running tests. |
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
11852
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
3 " Only load this once. |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
4 if 1 |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
5 if exists('s:did_load') |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
6 finish |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
7 endif |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
8 let s:did_load = 1 |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
9 endif |
825a4717f14a
patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents:
11850
diff
changeset
|
10 |
9778
4360b2b46125
commit https://github.com/vim/vim/commit/66459b7c98c67f8a9d39de8f08e8e8f1fca0e359
Christian Brabandt <cb@256bit.org>
parents:
9501
diff
changeset
|
11 " Make sure 'runtimepath' and 'packpath' does not include $HOME. |
9501
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after |
9784
60a06c331524
commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents:
9778
diff
changeset
|
13 if has('packages') |
60a06c331524
commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents:
9778
diff
changeset
|
14 let &packpath = &rtp |
60a06c331524
commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents:
9778
diff
changeset
|
15 endif |
9501
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " Only when the +eval feature is present. |
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 if 1 |
11637
bcab4e804c20
patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents:
9784
diff
changeset
|
19 " Make sure the .Xauthority file can be found after changing $HOME. |
bcab4e804c20
patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents:
9784
diff
changeset
|
20 if $XAUTHORITY == '' |
bcab4e804c20
patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents:
9784
diff
changeset
|
21 let $XAUTHORITY = $HOME . '/.Xauthority' |
bcab4e804c20
patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents:
9784
diff
changeset
|
22 endif |
bcab4e804c20
patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents:
9784
diff
changeset
|
23 |
9501
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 " Make sure $HOME does not get read or written. |
11850
eb339f9af281
patch 8.0.0805: GUI test fails with gnome2
Christian Brabandt <cb@256bit.org>
parents:
11637
diff
changeset
|
25 " It must exist, gnome tries to create $HOME/.gnome2 |
eb339f9af281
patch 8.0.0805: GUI test fails with gnome2
Christian Brabandt <cb@256bit.org>
parents:
11637
diff
changeset
|
26 let $HOME = getcwd() . '/XfakeHOME' |
eb339f9af281
patch 8.0.0805: GUI test fails with gnome2
Christian Brabandt <cb@256bit.org>
parents:
11637
diff
changeset
|
27 call mkdir($HOME) |
9501
f0201deac2a2
commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 endif |