]> granicus.if.org Git - vim/commitdiff
patch 8.0.0438: the fnamemodify test may cause later tests to fail v8.0.0438
authorBram Moolenaar <Bram@vim.org>
Thu, 9 Mar 2017 13:00:27 +0000 (14:00 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 9 Mar 2017 13:00:27 +0000 (14:00 +0100)
Problem:    The fnamemodify test changes 'shell' in a way later tests may not
            be able to use system().
Solution:   Save and restore 'shell'.

src/testdir/test_fnamemodify.vim
src/version.c

index 2267e18e3be0e5c01031cc0c9852ff7084cda82d..1c2a80d0eea0b15e8bdc44dcbeafd21544c00521 100644 (file)
@@ -1,6 +1,8 @@
 " Test filename modifiers.
 
 func Test_fnamemodify()
+  let save_home = $HOME
+  let save_shell = &shell
   let $HOME = fnamemodify('.', ':p:h:h')
   set shell=sh
 
@@ -39,7 +41,9 @@ func Test_fnamemodify()
   call assert_equal("'abc\ndef'", fnamemodify("abc\ndef", ':S'))
   set shell=tcsh
   call assert_equal("'abc\\\ndef'",  fnamemodify("abc\ndef", ':S'))
-  set shell&
+
+  let $HOME = save_home
+  let &shell = save_shell
 endfunc
 
 func Test_expand()
index 413c2c1de54df8786957ccb5c67d5d074c1f70ab..811a3d6a982efa891ff41692dcba2428eb5669e0 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    438,
 /**/
     437,
 /**/