From: Tay Ray Chuan <rctay89@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Fix a false negative in t5512 when run using sh -x
Date: Mon, 10 May 2010 15:28:53 +0800 [thread overview]
Message-ID: <AANLkTiloDJFtaQDEsL2ZquN1moAAeHr40YAEf1RCcR9f@mail.gmail.com> (raw)
In-Reply-To: <1273475946-2079-1-git-send-email-j6t@kdbg.org>
On Mon, May 10, 2010 at 3:19 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> The test compares the stderr of a git command called with test_must_fail
> to some expected output. With bash (and probably other shells as well)
> when run with -x turned on, command trace output ends up in the captured
> output. Of course, the actual output does not match the expected output
> anymore.
>
> Use 'grep' to check for expected output.
[snip]
> @@ -103,7 +99,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
> # We could just as easily have used "master"; the "*" emphasizes its
> # role as a pattern.
> test_must_fail git ls-remote refs*master >actual 2>&1 &&
> - test_cmp exp actual
> + grep "does not appear to be a git repository" actual
>
> '
for the sake of cross-platform/shell, I think this trade-off is acceptable.
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
--
Cheers,
Ray Chuan
next prev parent reply other threads:[~2010-05-10 7:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 7:19 [PATCH] Fix a false negative in t5512 when run using sh -x Johannes Sixt
2010-05-10 7:28 ` Tay Ray Chuan [this message]
2010-05-10 9:09 ` Sverre Rabbelier
2010-05-10 10:23 ` Johannes Sixt
2010-05-10 10:45 ` Sverre Rabbelier
2010-05-10 10:34 ` Jonathan Nieder
2010-05-10 11:03 ` Johannes Sixt
2010-05-10 11:31 ` Jonathan Nieder
2010-05-10 11:34 ` Johannes Sixt
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=AANLkTiloDJFtaQDEsL2ZquN1moAAeHr40YAEf1RCcR9f@mail.gmail.com \
--to=rctay89@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.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).