Fix #1716 - Replace tempdir() with a wrapper to preserve TMPDIR

This commit is contained in:
w0rp
2018-07-12 13:05:59 +01:00
parent 1fc3a1563b
commit 7d66293bbc
18 changed files with 145 additions and 133 deletions

View File

@@ -0,0 +1,13 @@
Before:
Save $TMPDIR
After:
Restore
Execute(ale#util#Tempname should create files in /tmp if $TMPDIR isn't set):
if has('unix')
let $TMPDIR = ''
Assert ale#util#Tempname() =~# '^/tmp'
" We should unlet the environment variable again.
AssertEqual '', $TMPDIR
endif