t6040 test: stop using global "script" variable

Change test code added in c0234b2ef6 ("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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 21, 2019 at 12:18 UTC e3d5e4bd5a167a50b6cda43ee1eaedef9842fe86
1 file changed +3 -3
t/t6040-tracking-info.sh
+3 -3
@@ -38,7 +38,7 @@ test_expect_success setup '
38 advance h
39 '
40
41 -script='s/^..\(b.\) *[0-9a-f]* \(.*\)$/\1 \2/p'
41 +t6040_script='s/^..\(b.\) *[0-9a-f]* \(.*\)$/\1 \2/p'
42 cat >expect <<\EOF
43 b1 [ahead 1, behind 1] d
44 b2 [ahead 1, behind 1] d
@@ -53,7 +53,7 @@ test_expect_success 'branch -v' '
53 cd test &&
54 git branch -v
55 ) |
56 - sed -n -e "$script" >actual &&
56 + sed -n -e "$t6040_script" >actual &&
57 test_i18ncmp expect actual
58 '
59
@@ -71,7 +71,7 @@ test_expect_success 'branch -vv' '
71 cd test &&
72 git branch -vv
73 ) |
74 - sed -n -e "$script" >actual &&
74 + sed -n -e "$t6040_script" >actual &&
75 test_i18ncmp expect actual
76 '
77