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 <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Adam Spiers committed Feb 19, 2013 at 14:06 UTC 6866654627fbf10387f3b5e83d9079d8a7f4b378
1 file changed +10
t/t0008-ignores.sh
+10
@@ -75,6 +75,16 @@ test_check_ignore () {
75 stderr_empty_on_success "$expect_code"
76 }
77
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)
88 test_expect_success_multi () {
89 prereq=
90 if test $# -eq 4