public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery•net>
To: Junio C Hamano <gitster@pobox•com>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: [PATCH] t4014-format-patch: do not assume 'test' is available as non-builtin
Date: Mon, 23 Nov 2009 10:35:53 +0100	[thread overview]
Message-ID: <4B0A5779.4050401@viscovery.net> (raw)

From: Johannes Sixt <j6t@kdbg•org>

One test case used 'xargs test', which assumes that 'test' is available
as external program. At least on MinGW it is not.

Moreover, 'git format-patch' was invoked in a pipeline, but not as the
last command. Rewrite the test case to catch breakage in 'git format-patch'
as well.

Signed-off-by: Johannes Sixt <j6t@kdbg•org>
---
 t/t4014-format-patch.sh |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 5689d59..7f267f9 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -549,9 +549,7 @@ test_expect_success 'options no longer allowed for format-patch' '
 	test_cmp expect.check output'

 test_expect_success 'format-patch --numstat should produce a patch' '
-	git format-patch --numstat --stdout master..side |
-	grep "^diff --git a/" |
-	wc -l |
-	xargs test 6 = '
+	git format-patch --numstat --stdout master..side > output &&
+	test 6 = $(grep "^diff --git a/" output | wc -l)'

 test_done
-- 
1.6.6.rc0.1059.gdce25

                 reply	other threads:[~2009-11-23  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4B0A5779.4050401@viscovery.net \
    --to=j.sixt@viscovery$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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