Skip to content

Commit 4c654f5

Browse files
committed
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 <[email protected]>
1 parent 957d740 commit 4c654f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t1512-rev-parse-disambiguation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '
257257
# commits created by commit-tree in earlier tests do not share
258258
# the prefix.
259259
git rev-parse --disambiguate=000000000 >actual &&
260-
test "$(wc -l <actual)" = 16 &&
260+
test $(wc -l <actual) = 16 &&
261261
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
262262
'
263263

0 commit comments

Comments
 (0)