mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fixup: get network drive only, not entire path
This commit is contained in:
parent
273c7cfa2a
commit
eb59dd6547
@ -9,11 +9,10 @@ describe('fnamemodify()', function()
|
||||
before_each(clear)
|
||||
|
||||
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
|
||||
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..[[\]]
|
||||
eq(root, fnamemodify([[\]], ':p:h'))
|
||||
eq(root, fnamemodify([[\]], ':p'))
|
||||
|
Loading…
Reference in New Issue
Block a user