view src/testdir/setup.vim @ 23124:f8cd5a5e03c4 v8.2.2108

patch 8.2.2108: Vim9: no test to check for :let error Commit: https://github.com/vim/vim/commit/083966f671475ae1b67f746f0b3f5309a45dfd8f Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 8 11:29:40 2020 +0100 patch 8.2.2108: Vim9: no test to check for :let error Problem: Vim9: no test to check for :let error. Solution: Add a test. Rename tests from _let_ to _var_.
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Dec 2020 11:30:06 +0100
parents 16647bd6372c
children ee50174810ac
line wrap: on
line source

" Common preparations for running tests.

" Only load this once.
if 1
  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 = ""

  " 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