vim-patch:8.1.0429: no test for :lcd with 'shellslash' (#9041)

Problem:    No test for :lcd with 'shellslash'.
Solution:   Add a test. (Daniel Hahler, closes vim/vim#3475)
c75878c923

Related NA patch:
vim-patch:8.1.0343
This commit is contained in:
Daniel Hahler 2018-09-23 21:46:21 +02:00 committed by Justin M. Keyes
parent 1a1164339a
commit 248478f5a0

View File

@ -89,3 +89,15 @@ function Test_GetCwd()
call assert_equal("y Xdir2 1", GetCwdInfo(2, tp_nr))
call assert_equal("z Xdir3 1", GetCwdInfo(1, tp_nr))
endfunc
function Test_GetCwd_lcd_shellslash()
new
let root = fnamemodify('/', ':p')
exe 'lcd '.root
let cwd = getcwd()
if !exists('+shellslash') || &shellslash
call assert_equal(cwd[-1:], '/')
else
call assert_equal(cwd[-1:], '\')
endif
endfunc