aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-01-15 22:43:59 -0500
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-01-28 13:58:55 -0500
commitc08c09add745a7cfba0428d7cfd2238d3cb1474b (patch)
treeeef09e93b843bfc08bde9c21f9e28da12c7c4d7c
parent5a39d2d00e398b404b4db7ec45b2f490d5bb845e (diff)
downloadrneovim-c08c09add745a7cfba0428d7cfd2238d3cb1474b.tar.gz
rneovim-c08c09add745a7cfba0428d7cfd2238d3cb1474b.tar.bz2
rneovim-c08c09add745a7cfba0428d7cfd2238d3cb1474b.zip
test: try $TMPDIR for temporary directory
-rw-r--r--test/functional/legacy/fnamemodify_spec.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/functional/legacy/fnamemodify_spec.lua b/test/functional/legacy/fnamemodify_spec.lua
index d8f812d77e..c1a50387a3 100644
--- a/test/functional/legacy/fnamemodify_spec.lua
+++ b/test/functional/legacy/fnamemodify_spec.lua
@@ -16,12 +16,10 @@ describe('filename modifiers', function()
func Test_fnamemodify()
if has('win32')
set shellslash
- let tmpdir = expand('$LOCALAPPDATA/Temp')
- call assert_equal(tmpdir, expand('$USERPROFILE/AppData/Local/Temp'))
else
- let tmpdir = resolve('/tmp')
set shell=sh
endif
+ let tmpdir = $TMPDIR
call assert_true(isdirectory(tmpdir))
execute 'cd '. tmpdir
let $HOME=fnamemodify('.', ':p:h:h:h')
@@ -30,11 +28,7 @@ describe('filename modifiers', function()
call assert_equal('t', fnamemodify('test.out', ':p')[-1:])
call assert_equal('test.out', fnamemodify('test.out', ':.'))
call assert_equal('../testdir/a', fnamemodify('../testdir/a', ':.'))
- if has('win32')
- call assert_equal('~/Local/Temp/test.out', fnamemodify('test.out', ':~'))
- else
- call assert_equal('test.out', fnamemodify('test.out', ':~'))
- endif
+ call assert_equal('test.out', fnamemodify('test.out', ':~'))
call assert_equal('../testdir/a', fnamemodify('../testdir/a', ':~'))
call assert_equal('a', fnamemodify('../testdir/a', ':t'))
call assert_equal('', fnamemodify('.', ':p:t'))