]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/test_tmpdir_wrapper.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / test / test_tmpdir_wrapper.vader
1 Before:
2   let g:exists = exists('$TMPDIR')
3   let g:old_value = $TMPDIR
4
5 After:
6   if g:exists
7     let $TMPDIR = g:old_value
8   else
9     silent! unlet! $TMPDIR
10   endif
11
12   unlet! g:exists
13   unlet! g:old_value
14
15 Execute(ale#util#Tempname shouldn't set $TMPDIR to an empty string if it isn't set):
16   " You can't run this test twice on old Vim versions.
17   if has('unix')
18     Assert ale#util#Tempname() =~# '^/tmp'
19     Assert !exists('$TMPDIR'), '$TMPDIR exists where it shouldn''t'
20   endif
21
22 Execute(ale#util#Tempname shouldn't replace $TMPDIR and reset them to an empty string):
23   if has('unix')
24     let $TMPDIR = ''
25     Assert ale#util#Tempname() =~# '^/tmp'
26
27     if !has('nvim')
28       Assert exists('$TMPDIR'), '$TMPDIR doesn''t exist where it should'
29     endif
30
31     AssertEqual '', $TMPDIR
32   endif