Skip to content

Commit 5e91056

Browse files
sunshinecogitster
authored andcommitted
t4034: fix use of one-shot variable assignment with shell function
The behavior of a one-shot environment variable assignment of the form "VAR=val cmd" is unspecified according to POSIX when "cmd" is a shell function. Indeed the behavior differs between shell implementations and even different versions of the same shell, thus should be avoided. Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a26d700 commit 5e91056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t4034-diff-words.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ test_language_driver () {
7070
word_diff --color-words
7171
'
7272
test_expect_success "diff driver '$lang' in Islandic" '
73-
LANG=is_IS.UTF-8 LANGUAGE=is LC_ALL="$is_IS_locale" \
73+
test_env LANG=is_IS.UTF-8 LANGUAGE=is LC_ALL="$is_IS_locale" \
7474
word_diff --color-words
7575
'
7676
}

0 commit comments

Comments
 (0)