Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-09-01 22:13:19 +0400
committerJunio C Hamano <gitster@pobox.com>2012-09-03 06:32:31 +0400
commitbf4b7219322d007f3ebd2a002114956d025e4703 (patch)
tree66c10828a7d9960cd12b26b5da25a174cd190273 /t/test-lib.sh
parent1c0cc7563b079e17f84cf93e5b735ec9fa4ad11a (diff)
test-lib.sh: Add check for invalid use of 'skip_all' facility
The 'skip_all' facility cannot be used after one or more tests have been executed using (for example) 'test_expect_success'. To do so results in invalid TAP output, which leads to 'prove' complaining of "Parse errors: No plan found in TAP output". Add a check for such invalid usage and abort the test with an error message to alert the test author. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 007d7b20d8..7f4cb67c0f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -383,6 +383,10 @@ test_done () {
case "$test_failure" in
0)
# Maybe print SKIP message
+ if test -n "$skip_all" && test $test_count -gt 0
+ then
+ error "Can't use skip_all after running some tests"
+ fi
[ -z "$skip_all" ] || skip_all=" # SKIP $skip_all"
if test $test_external_has_tap -eq 0