diff options
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-x | t/t1300-repo-config.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index e894629e7e..42eac2a7cb 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -448,6 +448,23 @@ test_expect_success numbers ' test z1048576 = "z$m" ' +cat > expect <<EOF +fatal: bad config value for 'aninvalid.unit' in .git/config +EOF + +test_expect_success 'invalid unit' ' + + git config aninvalid.unit "1auto" && + s=$(git config aninvalid.unit) && + test "z1auto" = "z$s" && + if git config --int --get aninvalid.unit 2>actual + then + echo config should have failed + false + fi && + cmp actual expect +' + cat > expect << EOF true false |