Commit 4cd67556 authored by Johannes Sixt's avatar Johannes Sixt Committed by Junio C Hamano

t0090: be prepared that 'wc -l' writes leading blanks

Use 'printf %d $(whatever|wc -l)' so that the shell removes the blanks
for us.
Signed-off-by: default avatarJohannes Sixt <j6t@kdbg.org>
Acked-by: default avatarThomas Rast <trast@student.ethz.ch>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 6c52ec8a
......@@ -17,15 +17,13 @@ cmp_cache_tree () {
# test-dump-cache-tree already verifies that all existing data is
# correct.
test_shallow_cache_tree () {
echo "SHA " \
"($(git ls-files|wc -l) entries, 0 subtrees)" >expect &&
printf "SHA (%d entries, 0 subtrees)\n" $(git ls-files|wc -l) >expect &&
cmp_cache_tree expect
}
test_invalid_cache_tree () {
echo "invalid (0 subtrees)" >expect &&
echo "SHA #(ref) " \
"($(git ls-files|wc -l) entries, 0 subtrees)" >>expect &&
printf "SHA #(ref) (%d entries, 0 subtrees)\n" $(git ls-files|wc -l) >>expect &&
cmp_cache_tree expect
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment