summaryrefslogtreecommitdiff
path: root/src/testdir/test_getcwd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-23 19:36:15 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-23 19:36:15 +0200
commitc75878c923034b883090aef3f08f565513d98f4d (patch)
tree0b3a7d0061a22b6ed85f5f9ff3a93e259d09b99a /src/testdir/test_getcwd.vim
parent3b30168f04b8a2a2f1bbaa2f90be546550463146 (diff)
downloadvim-git-c75878c923034b883090aef3f08f565513d98f4d.tar.gz
patch 8.1.0429: no test for :lcd with 'shellslash'v8.1.0429
Problem: No test for :lcd with 'shellslash'. Solution: Add a test. (Daniel Hahler, closes #3475)
Diffstat (limited to 'src/testdir/test_getcwd.vim')
-rw-r--r--src/testdir/test_getcwd.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_getcwd.vim b/src/testdir/test_getcwd.vim
index 334b89077..5d97295e9 100644
--- 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