mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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: Johannes Sixt <j6t@kdbg.org> Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6c52ec8a9a
commit
4cd6755656
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue