git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] grep: Don't pass a TODO test if REG_STARTEND is supported
@ 2010-07-08  0:42 Ævar Arnfjörð Bjarmason
  2010-07-08 19:40 ` Junio C Hamano
  0 siblings, 1 reply; 36+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-08  0:42 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change the git grep test that utilizes the REG_STARTEND flag so that
it doesn't TODO pass on platforms where REG_STARTEND is supported.

Git's own harness doesn't care, but a TAP harness will report all TODO
tests that pass. Having t7008-grep-binary.sh be the only test (aside
from the test-lib.sh test) that passes a TODO test is distracting.

Before prove(1)'s test summary looked like this:

    All tests successful.

    Test Summary Report
    -------------------
    ./t0000-basic.sh                        (Wstat: 0 Tests: 46 Failed: 0)
      TODO passed:   5
    ./t7008-grep-binary.sh                  (Wstat: 0 Tests: 18 Failed: 0)
      TODO passed:   11
    Files=476, Tests=6071, [...]
    Result: PASS

And now it'll give:

    All tests successful.

    Test Summary Report
    -------------------
    ./t0000-basic.sh                        (Wstat: 0 Tests: 46 Failed: 0)
      TODO passed:   5
    Files=476, Tests=6071,

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t7008-grep-binary.sh |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/t/t7008-grep-binary.sh b/t/t7008-grep-binary.sh
index eb8ca88..6fd2b40 100755
--- a/t/t7008-grep-binary.sh
+++ b/t/t7008-grep-binary.sh
@@ -59,11 +59,16 @@ test_expect_success 'git grep -Fi iLE a' '
 	git grep -Fi iLE a
 '
 
-# This test actually passes on platforms where regexec() supports the
-# flag REG_STARTEND.
-test_expect_failure 'git grep ile a' '
-	git grep ile a
-'
+if git grep ile a
+then
+	# This only passes on platforms where regexec() supports the
+	# REG_STARTEND flag.
+	test_expect_success 'git grep ile a' 'git grep ile a'
+else
+	# On platforms where REG_STARTEND isn't supported we mark the
+	# failure as a TODO.
+	test_expect_failure 'git grep ile a' 'git grep ile a'
+fi
 
 test_expect_failure 'git grep .fi a' '
 	git grep .fi a
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2010-08-18 10:41 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08  0:42 [PATCH] grep: Don't pass a TODO test if REG_STARTEND is supported Ævar Arnfjörð Bjarmason
2010-07-08 19:40 ` Junio C Hamano
2010-07-08 20:09   ` Ævar Arnfjörð Bjarmason
2010-07-08 21:58     ` René Scharfe
2010-07-15 15:32       ` Ævar Arnfjörð Bjarmason
2010-07-15 17:47     ` Junio C Hamano
2010-07-15 18:44       ` Ævar Arnfjörð Bjarmason
     [not found]         ` <20100715220059.GA3312@burratino>
2010-07-16 13:58           ` [RFC/PATCH] Update compat/regex Ævar Arnfjörð Bjarmason
2010-07-16 14:17             ` Andreas Schwab
2010-08-15 11:08               ` Ævar Arnfjörð Bjarmason
2010-08-16 12:26                 ` Paolo Bonzini
2010-08-17  3:25                 ` [PATCH/RFC 0/3] " Ævar Arnfjörð Bjarmason
2010-08-17  3:25                 ` [PATCH/RFC 2/3] compat/regex: hacks to get the gawk regex engine to compile within git Ævar Arnfjörð Bjarmason
2010-08-17  3:35                   ` Jonathan Nieder
2010-08-17  3:25                 ` [PATCH/RFC 3/3] t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND Ævar Arnfjörð Bjarmason
     [not found]                 ` <1282015548-19074-2-git-send-email-avarab@gmail.com>
2010-08-17  3:37                   ` [PATCH/RFC 1/3] compat/regex: use the regex engine from gawk for compat Jonathan Nieder
2010-08-17  3:50                     ` Ævar Arnfjörð Bjarmason
2010-08-17  4:08                       ` Jonathan Nieder
2010-08-17  5:17                 ` [PATCH/RFC v2 0/3] Update compat/regex Ævar Arnfjörð Bjarmason
2010-08-17  8:03                   ` Jonathan Nieder
2010-08-17  9:24                     ` [PATCH 0/5] " Ævar Arnfjörð Bjarmason
2010-08-17 11:46                       ` Paolo Bonzini
2010-08-17 23:19                       ` Junio C Hamano
2010-08-17 23:50                         ` Jonathan Nieder
2010-08-18 10:41                           ` Ævar Arnfjörð Bjarmason
2010-08-17  9:24                     ` [PATCH 2/5] compat/regex: get the gawk regex engine to compile within git Ævar Arnfjörð Bjarmason
2010-08-17  9:24                     ` [PATCH 3/5] Change regerror() declaration from K&R style to ANSI C (C89) Ævar Arnfjörð Bjarmason
2010-08-17  9:24                     ` [PATCH 4/5] t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND Ævar Arnfjörð Bjarmason
2010-08-17  9:24                     ` [PATCH 5/5] autoconf: don't use platform regex if it lacks REG_STARTEND Ævar Arnfjörð Bjarmason
2010-08-17  5:17                 ` [PATCH/RFC v2 2/3] compat/regex: get the gawk regex engine to compile within git Ævar Arnfjörð Bjarmason
2010-08-17  5:17                 ` [PATCH/RFC v2 3/3] t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND Ævar Arnfjörð Bjarmason
2010-07-16 14:33         ` [PATCH] grep: Don't pass a TODO test if REG_STARTEND is supported Ævar Arnfjörð Bjarmason
2010-07-16 19:50           ` Jonathan Nieder
2010-07-16 20:51             ` Ævar Arnfjörð Bjarmason
2010-07-16 21:06               ` Jonathan Nieder
2010-07-16 21:19                 ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).