fix(windows):exepath, stdpath return wrong slashes #19111

exepath and stdpath should respect shellslash and return path with
proper file separator.
Closes #13787
This commit is contained in:
Enan Ajmain
2022-07-18 06:00:08 +06:00
committed by GitHub
parent 776913e32e
commit 1b462705d0
4 changed files with 28 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ local iswin = helpers.iswin
local startswith = helpers.startswith
local write_file = helpers.write_file
local meths = helpers.meths
local alter_slashes = helpers.alter_slashes
local testfile = 'Xtest_startuptime'
after_each(function()
@@ -33,9 +34,9 @@ end)
describe('startup', function()
it('--clean', function()
clear()
ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) ~= nil)
ok(string.find(alter_slashes(meths.get_option('runtimepath')), funcs.stdpath('config'), 1, true) ~= nil)
clear('--clean')
ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) == nil)
ok(string.find(alter_slashes(meths.get_option('runtimepath')), funcs.stdpath('config'), 1, true) == nil)
end)
it('--startuptime', function()