test: win: add tests for shellslash

This commit is contained in:
Jan Edmund Lazo 2018-01-11 11:05:15 -05:00
parent afbdafffc2
commit a619c3fcf9

View File

@ -3,6 +3,7 @@ local clear = helpers.clear
local eq = helpers.eq
local iswin = helpers.iswin
local fnamemodify = helpers.funcs.fnamemodify
local command = helpers.command
describe('fnamemodify()', function()
before_each(clear)
@ -11,6 +12,11 @@ describe('fnamemodify()', function()
if iswin() then
eq([[C:\]], fnamemodify([[\]], ':p:h'))
eq([[C:\]], fnamemodify([[\]], ':p'))
eq([[C:\]], fnamemodify([[/]], ':p:h'))
eq([[C:\]], fnamemodify([[/]], ':p'))
command('set shellslash')
eq([[C:/]], fnamemodify([[\]], ':p:h'))
eq([[C:/]], fnamemodify([[\]], ':p'))
eq([[C:/]], fnamemodify([[/]], ':p:h'))
eq([[C:/]], fnamemodify([[/]], ':p'))
else