{"thread":{"id":"31411","subject":"[PATCH 5/6] test-lib.sh: Add check for invalid use of 'skip_all' facility","startedAt":"2012-09-01T18:13:19Z","lastAt":"2012-09-01T18:13:19Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"198204","messageId":"5042503F.7040101@ramsay1.demon.co.uk","threadId":"31411","inReplyTo":null,"subject":"[PATCH 5/6] test-lib.sh: Add check for invalid use of 'skip_all' facility","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-09-01T18:13:19Z","receivedAt":"2012-09-01T18:13:19Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe 'skip_all' facility cannot be used after one or more tests\nhave been executed using (for example) 'test_expect_success'.\nTo do so results in invalid TAP output, which leads to 'prove'\ncomplaining of \"Parse errors: No plan found in TAP output\".\n\nAdd a check for such invalid usage and abort the test with an\nerror message to alert the test author.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n t/test-lib.sh | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 56b028c..283d27a 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -383,6 +383,10 @@ test_done () {\n \tcase \"$test_failure\" in\n \t0)\n \t\t# Maybe print SKIP message\n+\t\tif test -n \"$skip_all\" && test $test_count -gt 0\n+\t\tthen\n+\t\t\terror \"Can't use skip_all after running some tests\"\n+\t\tfi\n \t\t[ -z \"$skip_all\" ] || skip_all=\" # SKIP $skip_all\"\n \n \t\tif test $test_external_has_tap -eq 0\n-- \n1.7.12\n"}]}