blob: 09dcf043fdff1495dc4e0d1e56b9118c4f5feaeb [file] [log] [blame]
Jon Seymour6c1c1442011-07-25 00:59:13 +10001#!/bin/sh
2
3test_description='
4Miscellaneous tests for git ls-tree.
5
6 1. git ls-tree fails in presence of tree damage.
7
8'
9
10. ./test-lib.sh
11
12test_expect_success 'setup' '
13 mkdir a &&
14 touch a/one &&
15 git add a/one &&
16 git commit -m test
17'
18
Jon Seymour04f89252011-07-25 00:59:14 +100019test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
Jon Seymour6c1c1442011-07-25 00:59:13 +100020 rm -f .git/objects/5f/cffbd6e4c5c5b8d81f5e9314b20e338e3ffff5 &&
21 test_must_fail git ls-tree -r HEAD
22'
23
24test_done