Skip to content

Commit

Permalink
t1512: ignore whitespaces in wc -l output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jul 11, 2012
1 parent 957d740 commit 4c654f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t1512-rev-parse-disambiguation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '
# commits created by commit-tree in earlier tests do not share
# the prefix.
git rev-parse --disambiguate=000000000 >actual &&
test "$(wc -l <actual)" = 16 &&
test $(wc -l <actual) = 16 &&
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
'

Expand Down

0 comments on commit 4c654f5

Please sign in to comment.