aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/defaults_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-04-01 14:26:36 -0400
committerJames McCoy <jamessan@jamessan.com>2018-04-01 22:40:20 -0400
commitec459965f50456a393f6fb182568a866e787fcda (patch)
treefe0b076d1246d547720d7e4317c7303afee6b55f /test/functional/options/defaults_spec.lua
parent868b84199ef321834022c19d9ba1d1d04cb77570 (diff)
downloadrneovim-ec459965f50456a393f6fb182568a866e787fcda.tar.gz
rneovim-ec459965f50456a393f6fb182568a866e787fcda.tar.bz2
rneovim-ec459965f50456a393f6fb182568a866e787fcda.zip
test/options: Fix stdpath() failures on Windows
Diffstat (limited to 'test/functional/options/defaults_spec.lua')
-rw-r--r--test/functional/options/defaults_spec.lua22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua
index 5c85834359..f452cafd22 100644
--- a/test/functional/options/defaults_spec.lua
+++ b/test/functional/options/defaults_spec.lua
@@ -442,7 +442,7 @@ describe('stdpath()', function()
XDG_CONFIG_HOME=alter_slashes('/home/original'),
}})
eq(alter_slashes('/home/original/nvim'), funcs.stdpath('config'))
- command('let $XDG_CONFIG_HOME="/home/new"')
+ command("let $XDG_CONFIG_HOME='"..alter_slashes('/home/new').."'")
eq(alter_slashes('/home/new/nvim'), funcs.stdpath('config'))
end)
@@ -456,7 +456,7 @@ describe('stdpath()', function()
it("doesn't expand ~/", function()
clear({env={
- XDG_CONFIG_HOME='~/frobnitz',
+ XDG_CONFIG_HOME=alter_slashes('~/frobnitz'),
}})
eq(alter_slashes('~/frobnitz/nvim'), funcs.stdpath('config'))
end)
@@ -487,7 +487,7 @@ describe('stdpath()', function()
XDG_DATA_HOME=alter_slashes('/home/original'),
}})
eq(alter_slashes('/home/original' .. appended_dir), funcs.stdpath('data'))
- command('let $XDG_DATA_HOME="/home/new"')
+ command("let $XDG_DATA_HOME='"..alter_slashes('/home/new').."'")
eq(alter_slashes('/home/new' .. appended_dir), funcs.stdpath('data'))
end)
@@ -501,7 +501,7 @@ describe('stdpath()', function()
it("doesn't expand ~/", function()
clear({env={
- XDG_DATA_HOME='~/frobnitz',
+ XDG_DATA_HOME=alter_slashes('~/frobnitz'),
}})
eq(alter_slashes('~/frobnitz' .. appended_dir), funcs.stdpath('data'))
end)
@@ -520,7 +520,7 @@ describe('stdpath()', function()
XDG_CACHE_HOME=alter_slashes('/home/original'),
}})
eq(alter_slashes('/home/original/nvim'), funcs.stdpath('cache'))
- command('let $XDG_CACHE_HOME="/home/new"')
+ command("let $XDG_CACHE_HOME='"..alter_slashes('/home/new').."'")
eq(alter_slashes('/home/new/nvim'), funcs.stdpath('cache'))
end)
@@ -534,7 +534,7 @@ describe('stdpath()', function()
it("doesn't expand ~/", function()
clear({env={
- XDG_CACHE_HOME='~/frobnitz',
+ XDG_CACHE_HOME=alter_slashes('~/frobnitz'),
}})
eq(alter_slashes('~/frobnitz/nvim'), funcs.stdpath('cache'))
end)
@@ -620,7 +620,10 @@ describe('stdpath()', function()
"doesn't expand $VAR and $IBLES",
'config_dirs', 'XDG_CONFIG_DIRS',
{ '$HOME', '$TMP' },
- { '$HOME/nvim', '$TMP/nvim' })
+ {
+ alter_slashes('$HOME/nvim'),
+ alter_slashes('$TMP/nvim')
+ })
behaves_like_dir_list_env(
@@ -663,7 +666,10 @@ describe('stdpath()', function()
"doesn't expand $VAR and $IBLES",
'data_dirs', 'XDG_DATA_DIRS',
{ '$HOME', '$TMP' },
- { '$HOME/nvim', '$TMP/nvim' })
+ {
+ alter_slashes('$HOME/nvim'),
+ alter_slashes('$TMP/nvim')
+ })
behaves_like_dir_list_env(
"doesn't expand ~/",