summaryrefslogtreecommitdiff
path: root/test/test_tmpdir_wrapper.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tmpdir_wrapper.vader')
-rw-r--r--test/test_tmpdir_wrapper.vader13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_tmpdir_wrapper.vader b/test/test_tmpdir_wrapper.vader
new file mode 100644
index 00000000..4d87061f
--- /dev/null
+++ b/test/test_tmpdir_wrapper.vader
@@ -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