mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix: support UNC paths in vim.fs.normalize
Closes https://github.com/neovim/neovim/issues/27068.
This commit is contained in:
@@ -308,6 +308,15 @@ describe('vim.fs', function()
|
||||
)
|
||||
end)
|
||||
|
||||
it('works with UNC paths', function()
|
||||
eq('//foo', vim.fs.normalize('//foo')) -- UNC path
|
||||
eq('//foo/bar', vim.fs.normalize('//foo//bar////')) -- UNC path
|
||||
eq('/foo', vim.fs.normalize('///foo')) -- Not a UNC path
|
||||
eq('/', vim.fs.normalize('//')) -- Not a UNC path
|
||||
eq('/', vim.fs.normalize('///')) -- Not a UNC path
|
||||
eq('/foo/bar', vim.fs.normalize('/foo//bar////')) -- Not a UNC path
|
||||
end)
|
||||
|
||||
if is_os('win') then
|
||||
it('Last slash is not truncated from root drive', function()
|
||||
eq('C:/', vim.fs.normalize('C:/'))
|
||||
|
||||
Reference in New Issue
Block a user