git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Fix t3404 assumption that `wc -l` does not use whitespace.
@ 2008-04-27 15:16 Brian Gernhardt
  2008-04-27 15:22 ` Johannes Schindelin
  0 siblings, 1 reply; 23+ messages in thread
From: Brian Gernhardt @ 2008-04-27 15:16 UTC (permalink / raw)
  To: git

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@silverinsanity.com>
---

 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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2008-05-16 14:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 15:16 [PATCH 2/2] Fix t3404 assumption that `wc -l` does not use whitespace Brian Gernhardt
2008-04-27 15:22 ` Johannes Schindelin
2008-04-27 15:32   ` Brian Gernhardt
2008-04-28  9:41     ` Jeff King
2008-04-28  9:56       ` Mike Ralphson
2008-05-13  9:11         ` Jeff King
2008-05-13 18:10           ` Mike Ralphson
2008-05-15 10:16             ` Mike Ralphson
2008-05-15 11:20               ` Jeff King
2008-05-15 11:23                 ` Jeff King
2008-05-15 17:18                 ` Junio C Hamano
2008-05-16 14:22                   ` Mike Ralphson
2008-04-28 12:40       ` Brian Gernhardt
2008-04-27 17:31   ` Junio C Hamano
2008-04-28 10:13     ` Johannes Schindelin
2008-04-28 11:40       ` Jörg Sommer
2008-04-28 13:42         ` Johannes Schindelin
2008-04-28 16:30           ` Jörg Sommer
2008-04-28 18:07             ` Johannes Schindelin
2008-04-28 16:19       ` Junio C Hamano
2008-04-28 18:01         ` Johannes Schindelin
2008-04-28 21:24           ` Junio C Hamano
2008-04-28 21:30             ` Johannes Schindelin

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).