Skip to content

Commit

Permalink
t4014-format-patch: do not assume 'test' is available as non-builtin
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Nov 23, 2009
1 parent 65c042d commit 4fa80cf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions t/t4014-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4fa80cf

Please sign in to comment.