diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-11 16:30:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-11 16:30:49 -0700 |
commit | 4c654f5f278ef4729497d1f3e3897acc030ff0b7 (patch) | |
tree | 2c34bc54056f00ee275917fbe95153bf65ae7809 /t | |
parent | 957d74062c1f0e92368aeda335e27d2d61f584f6 (diff) | |
download | git-4c654f5f278ef4729497d1f3e3897acc030ff0b7.tar.gz git-4c654f5f278ef4729497d1f3e3897acc030ff0b7.tar.xz |
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t1512-rev-parse-disambiguation.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh index 3ed7558c1..1eb35143f 100755 --- a/t/t1512-rev-parse-disambiguation.sh +++ b/t/t1512-rev-parse-disambiguation.sh @@ -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 ' |