Skip to content

Commit 056f700

Browse files
committed
patch 8.0.0438: the fnamemodify test may cause later tests to fail
Problem: The fnamemodify test changes 'shell' in a way later tests may not be able to use system(). Solution: Save and restore 'shell'.
1 parent 644df41 commit 056f700

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/testdir/test_fnamemodify.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
" Test filename modifiers.
22

33
func Test_fnamemodify()
4+
let save_home = $HOME
5+
let save_shell = &shell
46
let $HOME = fnamemodify('.', ':p:h:h')
57
set shell=sh
68

@@ -39,7 +41,9 @@ func Test_fnamemodify()
3941
call assert_equal("'abc\ndef'", fnamemodify("abc\ndef", ':S'))
4042
set shell=tcsh
4143
call assert_equal("'abc\\\ndef'", fnamemodify("abc\ndef", ':S'))
42-
set shell&
44+
45+
let $HOME = save_home
46+
let &shell = save_shell
4347
endfunc
4448

4549
func Test_expand()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
438,
767769
/**/
768770
437,
769771
/**/

0 commit comments

Comments
 (0)