From eb59dd654759c3ecde7bea22e2651713e29d0912 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 11 Jan 2018 19:16:39 -0500 Subject: [PATCH] fixup: get network drive only, not entire path --- test/functional/eval/fnamemodify_spec.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/functional/eval/fnamemodify_spec.lua b/test/functional/eval/fnamemodify_spec.lua index 21e670c41c..2225c5da7c 100644 --- a/test/functional/eval/fnamemodify_spec.lua +++ b/test/functional/eval/fnamemodify_spec.lua @@ -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'))