[PATCH] Fix git-tag test breakage caused by broken sed on Leopard

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Wincent Colaiuta
Date: Thursday, November 15, 2007 - 8:16 am

The 'message in editor has initial comment' test fails on Leopard (and
possibly on other versions of Mac OS X as well) due to the limited
sed syntax available on that platform.

Avoid the breakage by using grep instead (suggested by Johannes
Schindelin).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---
  t/t7004-tag.sh |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 096fe33..02ec9c3 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1007,7 +1007,7 @@ test_expect_failure \
  test_expect_success \
  	'message in editor has initial comment' '
  	GIT_EDITOR=cat git tag -a initial-comment > actual || true &&
-	test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0
+	test -z "$(grep -e \"^#\" -e \"^$\" actual)"
  '

  get_tag_header reuse $commit commit $time >expect
-- 
1.5.3.5

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] t7004 (master) busted on Leopard, Wincent Colaiuta, (Thu Nov 15, 6:38 am)
Re: [BUG] t7004 (master) busted on Leopard, Johannes Schindelin, (Thu Nov 15, 7:37 am)
Re: [BUG] t7004 (master) busted on Leopard, Wincent Colaiuta, (Thu Nov 15, 8:12 am)
[PATCH] Fix git-tag test breakage caused by broken sed on ..., Wincent Colaiuta, (Thu Nov 15, 8:16 am)
[PATCH v2] Fix git-tag test breakage caused by broken sed ..., Wincent Colaiuta, (Thu Nov 15, 8:47 am)