git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: git@vger.kernel.org, Brandon Casey <drafnel@gmail.com>
Subject: Re: [PATCH 3/4] t/t4018: test whether the word_regex patterns compile
Date: Thu, 9 Sep 2010 15:23:31 -0400	[thread overview]
Message-ID: <20100909192331.GD32508@sigill.intra.peff.net> (raw)
In-Reply-To: <rRj7JpFIk_D_n7-wGkkucC32o5VKAledjObzc1bFHX8SBUchsp6UDflVKjnjY9xKm9Q48ir5iu8@cipher.nrlssc.navy.mil>

On Thu, Sep 09, 2010 at 02:02:47PM -0500, Brandon Casey wrote:

> From: Brandon Casey <drafnel@gmail.com>
> 
> Previously (e3bf5e43), a test was added to test whether the builtin
> xfuncname regular expressions could be compiled without error by regcomp.
> Let's do the same for the word_regex patterns.  This should help catch any
> cross-platform incompatibilities that exist between the pattern creator's
> system and the various platforms that the test suite is commonly run on.

Definitely something we should be doing, but one nit:

> diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
> index 61de8a2..620cd02 100755
> --- a/t/t4018-diff-funcname.sh
> +++ b/t/t4018-diff-funcname.sh
> @@ -40,6 +40,11 @@ do
>  		! ( git diff --no-index Beer.java Beer-correct.java 2>&1 |
>  			grep "fatal" > /dev/null )
>  	'
> +	test_expect_success "builtin $p wordRegex pattern compiles" '
> +		! ( git diff --no-index --word-diff \
> +			Beer.java Beer-correct.java 2>&1 |
> +			grep "fatal" > /dev/null )
> +	'

Why the subshell? Shouldn't just testing the pipeline outcome work?

-Peff

  reply	other threads:[~2010-09-09 19:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 19:02 [PATCH 1/4] diff.c: call regfree to free memory allocated by regcomp when necessary Brandon Casey
2010-09-09 19:02 ` [PATCH 2/4] xdiff-interface.c: always trim trailing space from xfuncname matches Brandon Casey
2010-09-09 19:21   ` Jeff King
2010-09-09 19:33     ` Brandon Casey
2010-09-09 19:35       ` Jeff King
2010-09-09 19:02 ` [PATCH 3/4] t/t4018: test whether the word_regex patterns compile Brandon Casey
2010-09-09 19:23   ` Jeff King [this message]
2010-09-09 19:39     ` Brandon Casey
2010-09-09 19:59       ` Jeff King
2010-09-10 16:13         ` [PATCH] t/t4018: avoid two unnecessary sub-shell invocations Brandon Casey
2010-09-10 17:25           ` Ævar Arnfjörð Bjarmason
2010-09-09 19:02 ` [PATCH 4/4] userdiff.c: add builtin fortran regex patterns Brandon Casey
2010-09-09 19:25   ` Jeff King
2010-09-09 19:41     ` Brandon Casey
2010-09-10 16:18       ` [PATCH 4/4 v2] " Brandon Casey
2010-09-09 19:15 ` [PATCH 1/4] diff.c: call regfree to free memory allocated by regcomp when necessary Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100909192331.GD32508@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).