diff options
Diffstat (limited to 't/t6500-gc.sh')
-rwxr-xr-x | t/t6500-gc.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh new file mode 100755 index 0000000000..63194d819e --- /dev/null +++ b/t/t6500-gc.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +test_description='basic git gc tests +' + +. ./test-lib.sh + +test_expect_success 'gc empty repository' ' + git gc +' + +test_expect_success 'gc does not leave behind pid file' ' + git gc && + test_path_is_missing .git/gc.pid +' + +test_expect_success 'gc --gobbledegook' ' + test_expect_code 129 git gc --nonsense 2>err && + test_i18ngrep "[Uu]sage: git gc" err +' + +test_expect_success 'gc -h with invalid configuration' ' + mkdir broken && + ( + cd broken && + git init && + echo "[gc] pruneexpire = CORRUPT" >>.git/config && + test_expect_code 129 git gc -h >usage 2>&1 + ) && + test_i18ngrep "[Uu]sage" broken/usage +' + +test_done |