aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2013-02-19 14:06:22 +0000
committerJunio C Hamano <gitster@pobox.com>2013-02-19 09:37:39 -0800
commit6866654627fbf10387f3b5e83d9079d8a7f4b378 (patch)
tree40b359d941903e714d5b7d793c110ef2ac15b5a3
parent72aeb18772deeb386da7dd8997b969877bd29e41 (diff)
downloadgit-6866654627fbf10387f3b5e83d9079d8a7f4b378.tar.gz
git-6866654627fbf10387f3b5e83d9079d8a7f4b378.tar.xz
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>
-rwxr-xr-xt/t0008-ignores.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index d7df7198c..ebe7c701f 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -75,6 +75,16 @@ test_check_ignore () {
stderr_empty_on_success "$expect_code"
}
+# Runs the same code with 3 different levels of output verbosity,
+# expecting success each time. Takes advantage of the fact that
+# check-ignore --verbose output is the same as normal output except
+# for the extra first column.
+#
+# Arguments:
+# - (optional) prereqs for this test, e.g. 'SYMLINKS'
+# - test name
+# - output to expect from -v / --verbose mode
+# - code to run (should invoke test_check_ignore)
test_expect_success_multi () {
prereq=
if test $# -eq 4