mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +00:00
fixup: get network drive only, not entire path
This commit is contained in:
@@ -9,11 +9,10 @@ describe('fnamemodify()', function()
|
|||||||
before_each(clear)
|
before_each(clear)
|
||||||
|
|
||||||
it('works', function()
|
it('works', function()
|
||||||
local drive_f = io.popen('cd', 'r')
|
|
||||||
local drive = string.gsub(drive_f:read('*a'), '[\n\r]', '')
|
|
||||||
drive_f:close()
|
|
||||||
|
|
||||||
if iswin() then
|
if iswin() then
|
||||||
|
local drive_f = io.popen('for %P in (%CD%) do @echo %~dP', 'r')
|
||||||
|
local drive = string.gsub(drive_f:read('*a'), '[\n\r]', '')
|
||||||
|
drive_f:close()
|
||||||
local root = drive..[[\]]
|
local root = drive..[[\]]
|
||||||
eq(root, fnamemodify([[\]], ':p:h'))
|
eq(root, fnamemodify([[\]], ':p:h'))
|
||||||
eq(root, fnamemodify([[\]], ':p'))
|
eq(root, fnamemodify([[\]], ':p'))
|
||||||
|
|||||||
Reference in New Issue
Block a user