Skip to content

Commit 4fa80cf

Browse files
j6tgitster
authored andcommitted
t4014-format-patch: do not assume 'test' is available as non-builtin
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>
1 parent 65c042d commit 4fa80cf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

t/t4014-format-patch.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,7 @@ test_expect_success 'options no longer allowed for format-patch' '
549549
test_cmp expect.check output'
550550

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

557555
test_done

0 commit comments

Comments
 (0)