Skip to content

Commit 960d1ec

Browse files
committed
t7508/12: set GIT_ADVICE=1 across all tests
The output of 'git status' changes depending on the availability of advice, even though the messages are to stdout. Since this test script is all about testing the output of 'git status' including the existence (or lack of) these messages, set the GIT_ADVICE environment globally across the script. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
1 parent ce725bb commit 960d1ec

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

t/t7508-status.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ TEST_PASSES_SANITIZE_LEAK=true
99
. ./test-lib.sh
1010
. "$TEST_DIRECTORY"/lib-terminal.sh
1111

12+
# 'git status' output changes depending on the availability of advice,
13+
# so force its output to enable advice, even though it goes to stdout.
14+
GIT_ADVICE=1 && export GIT_ADVICE
15+
1216
test_expect_success 'status -h in broken repository' '
1317
git config --global advice.statusuoption false &&
1418
mkdir broken &&

t/t7512-status-help.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ TEST_PASSES_SANITIZE_LEAK=true
1717

1818
set_fake_editor
1919

20+
# 'git status' output changes depending on the availability of advice,
21+
# so force its output to enable advice, even though it goes to stdout.
22+
GIT_ADVICE=1 && export GIT_ADVICE
23+
2024
test_expect_success 'prepare for conflicts' '
2125
git config --global advice.statusuoption false &&
2226
test_commit init main.txt init &&

0 commit comments

Comments
 (0)