[BUG] t7004 (master) busted on Leopard
- From
Wincent Colaiuta <win@wincent.com>
- Date
- Nov 15, 2007, 13:38 UTC
- Message-ID
- <17E3F66C-4644-4B64-817C-88062727A2D9@wincent.com>
Commit 4d8b1dc850 added a couple of tests to t7004, and my testing reveals that this one has been broken on Leopard since then:
* FAIL 83: 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
(Not sure whether this affects other platforms, or versions of Mac OS X prior to Leopard, as I only have one machine here.)
The problem is the version of sed that ships with Leopard fails to match the initial comment with this syntax:
sed -n "/^\(#\|\$\)/p" actual
An alternative that works is:
sed -n "/^[#\$]/p" actual
Can someone with knowledge of sed compatibility across multiple platforms suggest an alternative which will work on a wider range of systems?
Cheers, Wincent