Add a test to check that git ls-tree sets non-zero exit code on error.
[git/jnareb-git.git] / t / t3103-ls-tree-misc.sh
blobc9c20f95e3f6264132c6d477851ff71bf18ad073
1 #!/bin/sh
3 test_description='
4 Miscellaneous tests for git ls-tree.
6 1. git ls-tree fails in presence of tree damage.
10 . ./test-lib.sh
12 test_expect_success 'setup' '
13 mkdir a &&
14 touch a/one &&
15 git add a/one &&
16 git commit -m test
19 test_expect_failure 'ls-tree fails with non-zero exit code on broken tree' '
20 rm -f .git/objects/5f/cffbd6e4c5c5b8d81f5e9314b20e338e3ffff5 &&
21 test_must_fail git ls-tree -r HEAD
24 test_done