t1512: ignore whitespaces in wc -l output
Some implementations of sed (e.g. MacOS X) have whitespaces in the output of "wc -l" that reads from the standard input. Ignore these whitespaces by not quoting the command substitution to be compared with the constant "16". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jul 11, 2012 at 16:30 UTC
4c654f5f278ef4729497d1f3e3897acc030ff0b7
1 file changed
+1
-1
t/t1512-rev-parse-disambiguation.sh
+1
-1
@@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '
257
# commits created by commit-tree in earlier tests do not share
258
# the prefix.
259
git rev-parse --disambiguate=000000000 >actual &&
260
- test "$(wc -l <actual)" = 16 &&
260
+ test $(wc -l <actual) = 16 &&
261
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
262
'
263