Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 6866654

Browse files
aspiersgitster
authored andcommitted
t0008: document test_expect_success_multi
test_expect_success_multi() helper function warrants some explanation, since at first sight it may seem like generic test framework plumbing, but is in fact specific to testing check-ignore, and allows more thorough testing of the various output formats without significantly increase the size of t0008. Signed-off-by: Adam Spiers <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 72aeb18 commit 6866654

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t0008-ignores.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ test_check_ignore () {
7575
stderr_empty_on_success "$expect_code"
7676
}
7777

78+
# Runs the same code with 3 different levels of output verbosity,
79+
# expecting success each time. Takes advantage of the fact that
80+
# check-ignore --verbose output is the same as normal output except
81+
# for the extra first column.
82+
#
83+
# Arguments:
84+
# - (optional) prereqs for this test, e.g. 'SYMLINKS'
85+
# - test name
86+
# - output to expect from -v / --verbose mode
87+
# - code to run (should invoke test_check_ignore)
7888
test_expect_success_multi () {
7989
prereq=
8090
if test $# -eq 4

0 commit comments

Comments
 (0)