Skip to content

Commit e3d5e4b

Browse files
avargitster
authored andcommitted
t6040 test: stop using global "script" variable
Change test code added in c0234b2 ("stat_tracking_info(): clear object flags used during counting", 2008-07-03) to stop using the "script" variable also used for lazy prerequisites in test-lib-functions.sh. Since this test uses test_i18ncmp and expects to use its own "script" variable twice it implicitly depends on the C_LOCALE_OUTPUT prerequisite not being a lazy prerequisite. A follow-up change will make it a lazy prerequisite, so we must remove this landmine before inadvertently stepping on it as we make that change. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2e43cd4 commit e3d5e4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t6040-tracking-info.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test_expect_success setup '
3838
advance h
3939
'
4040

41-
script='s/^..\(b.\) *[0-9a-f]* \(.*\)$/\1 \2/p'
41+
t6040_script='s/^..\(b.\) *[0-9a-f]* \(.*\)$/\1 \2/p'
4242
cat >expect <<\EOF
4343
b1 [ahead 1, behind 1] d
4444
b2 [ahead 1, behind 1] d
@@ -53,7 +53,7 @@ test_expect_success 'branch -v' '
5353
cd test &&
5454
git branch -v
5555
) |
56-
sed -n -e "$script" >actual &&
56+
sed -n -e "$t6040_script" >actual &&
5757
test_i18ncmp expect actual
5858
'
5959

@@ -71,7 +71,7 @@ test_expect_success 'branch -vv' '
7171
cd test &&
7272
git branch -vv
7373
) |
74-
sed -n -e "$script" >actual &&
74+
sed -n -e "$t6040_script" >actual &&
7575
test_i18ncmp expect actual
7676
'
7777

0 commit comments

Comments
 (0)