} >expect-final
'
-test_expect_failure diff-files '
+test_expect_success diff-files '
git diff-files --raw >actual &&
- diff -u expect-files actual
+ test_cmp expect-files actual
'
-test_expect_failure diff-index '
+test_expect_success diff-index '
git diff-index --raw HEAD -- >actual &&
- diff -u expect-index actual
+ test_cmp expect-index actual
'
-test_expect_failure 'add -u' '
+test_expect_success 'add -u' '
rm -f ".git/saved-index" &&
cp -p ".git/index" ".git/saved-index" &&
git add -u &&
git ls-files -s >actual &&
- diff -u expect-final actual
+ test_cmp expect-final actual
'
-test_expect_failure 'commit -a' '
+test_expect_success 'commit -a' '
if test -f ".git/saved-index"
then
rm -f ".git/index" &&
fi &&
git commit -m "second" -a &&
git ls-files -s >actual &&
- diff -u expect-final actual &&
+ test_cmp expect-final actual &&
rm -f .git/index &&
git read-tree HEAD &&
git ls-files -s >actual &&
- diff -u expect-final actual
+ test_cmp expect-final actual
'
test_done