[PATCH 2/2] Fix t3404 assumption that `wc -l` does not use whitespace.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



t3404-rebase-interactive used `grep -Fx 0` to match against `wc -l`
output.  This fails on OS X and any other system where wc outputs
whitespace.  Use `test 0 = `... instead, like we do in other tests.

Signed-off-by: Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx>
---

 Should this construct go into CodingStyle?  I seem to have to write
 patches like this every month or so.

 t/t3404-rebase-interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index d20ed4f..f204284 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -211,7 +211,7 @@ test_expect_success 'setting marks works' '
 	test "$(git rev-parse HEAD~2)" = \
 		"$(git rev-parse refs/rebase-marks/42)" &&
 	git rebase --abort &&
-	ls $marks_dir | wc -l | grep -Fx 0
+	test 0 = $(ls $marks_dir | wc -l)
 '
 
 test_expect_success 'reset with nonexistent mark fails' '
-- 
1.5.5.1.174.g8f57349

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux