]> granicus.if.org Git - vim/commitdiff
patch 8.1.0429: no test for :lcd with 'shellslash' v8.1.0429
authorBram Moolenaar <Bram@vim.org>
Sun, 23 Sep 2018 17:36:15 +0000 (19:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 23 Sep 2018 17:36:15 +0000 (19:36 +0200)
Problem:    No test for :lcd with 'shellslash'.
Solution:   Add a test. (Daniel Hahler, closes #3475)

src/testdir/test_getcwd.vim
src/version.c

index 334b890772388afa22eb082b2342b37975375097..5d97295e9a325cce9fabfedd0a27487076db87b1 100644 (file)
@@ -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
index 724c9aa5eb362b905325d83015ed06a0696c2893..c62e484e83dd03f0808c885343623d9e3a4930eb 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    429,
 /**/
     428,
 /**/