From 248478f5a04e9dcc9ebeded052222a3b168645a2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 23 Sep 2018 21:46:21 +0200 Subject: 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) https://github.com/vim/vim/commit/c75878c923034b883090aef3f08f565513d98f4d Related NA patch: vim-patch:8.1.0343 --- src/nvim/testdir/test_getcwd.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_getcwd.vim b/src/nvim/testdir/test_getcwd.vim index 15eab2abbb..194963f694 100644 --- a/src/nvim/testdir/test_getcwd.vim +++ b/src/nvim/testdir/test_getcwd.vim @@ -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 -- cgit