fix(fs.lua): normalize slash truncation

Preserve last slash in windows' root drive directories
This commit is contained in:
Mike
2023-05-25 16:05:11 +02:00
parent 98b22867c3
commit 886996ff74
2 changed files with 10 additions and 1 deletions

View File

@@ -301,5 +301,10 @@ describe('vim.fs', function()
return vim.fs.normalize('$XDG_CONFIG_HOME/nvim')
]], xdg_config_home))
end)
if is_os('win') then
it('Last slash is not truncated from root drive', function()
eq('C:/', exec_lua [[ return vim.fs.normalize('C:/') ]])
end)
end
end)
end)