# 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
 }
 
        test_no_cache_tree
 '
 
-test_expect_failure 'second commit has cache-tree' '
+test_expect_success 'second commit has cache-tree' '
        test_commit bar &&
        test_shallow_cache_tree
 '
 
-test_expect_failure 'reset --hard gives cache-tree' '
+test_expect_success 'reset --hard gives cache-tree' '
        test-scrap-cache-tree &&
        git reset --hard &&
        test_shallow_cache_tree
 '
 
-test_expect_failure 'reset --hard without index gives cache-tree' '
+test_expect_success 'reset --hard without index gives cache-tree' '
        rm -f .git/index &&
        git reset --hard &&
        test_shallow_cache_tree