changeset 14834:ae62baca938c v8.1.0429

patch 8.1.0429: no test for :lcd with 'shellslash' commit https://github.com/vim/vim/commit/c75878c923034b883090aef3f08f565513d98f4d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 23 19:36:15 2018 +0200 patch 8.1.0429: no test for :lcd with 'shellslash' Problem: No test for :lcd with 'shellslash'. Solution: Add a test. (Daniel Hahler, closes https://github.com/vim/vim/issues/3475)
author Christian Brabandt <cb@256bit.org>
date Sun, 23 Sep 2018 19:45:07 +0200
parents 521d0e0c7270
children 36b3ea49d990
files src/testdir/test_getcwd.vim src/version.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_getcwd.vim
+++ b/src/testdir/test_getcwd.vim
@@ -98,3 +98,15 @@ function Test_GetCwd()
 	call assert_equal("z Xdir3 1", GetCwdInfo(1, tp_nr))
 	call assert_equal(g:topdir, getcwd(-1))
 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
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    429,
+/**/
     428,
 /**/
     427,