aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-01-26 14:26:01 -0800
committerJustin M. Keyes <justinkz@gmail.com>2020-01-26 17:30:47 -0800
commit1c3ca4f18fdc403813d8959b49626ac1c99e2c59 (patch)
tree4f2150ee9703be7ed7c7ea4bd56d21f3eca80eaf /test
parentc4f4719ced9101195a84b350249ab2a105de627c (diff)
downloadrneovim-1c3ca4f18fdc403813d8959b49626ac1c99e2c59.tar.gz
rneovim-1c3ca4f18fdc403813d8959b49626ac1c99e2c59.tar.bz2
rneovim-1c3ca4f18fdc403813d8959b49626ac1c99e2c59.zip
mksession: always unix slashes "/" for filepaths
Diffstat (limited to 'test')
-rw-r--r--test/functional/ex_cmds/mksession_spec.lua5
-rw-r--r--test/functional/helpers.lua2
2 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua
index 305850a09e..949724bb53 100644
--- a/test/functional/ex_cmds/mksession_spec.lua
+++ b/test/functional/ex_cmds/mksession_spec.lua
@@ -96,7 +96,8 @@ describe(':mksession', function()
it('restores CWD for :terminal buffers #11288', function()
local cwd_dir = funcs.fnamemodify('.', ':p:~'):gsub([[[\/]*$]], '')
- local session_path = cwd_dir..get_pathsep()..session_file
+ cwd_dir = cwd_dir:gsub([[\]], '/') -- :mksession always uses unix slashes.
+ local session_path = cwd_dir..'/'..session_file
command('cd '..tab_dir)
command('terminal echo $PWD')
@@ -108,7 +109,7 @@ describe(':mksession', function()
clear()
command('silent source '..session_path)
- local expected_cwd = cwd_dir..get_pathsep()..tab_dir
+ local expected_cwd = cwd_dir..'/'..tab_dir
matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%'))
command('qall!')
end)
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 3ffc6137d6..53c4d140b6 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -794,7 +794,7 @@ function module.alter_slashes(obj)
end
return ret
else
- assert(false, 'Could only alter slashes for tables of strings and strings')
+ assert(false, 'expected string or table of strings, got '..type(obj))
end
end