mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-13 16:01:54 +08:00
Fix #1716 - Replace tempdir() with a wrapper to preserve TMPDIR
This commit is contained in:
13
test/test_tmpdir_wrapper.vader
Normal file
13
test/test_tmpdir_wrapper.vader
Normal 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
|
||||
Reference in New Issue
Block a user