X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft1300-repo-config.sh;h=64f05080b65c2b9506d1e34748b47ee721026aef;hb=2d4fef9b86f41ad929f533e0e52dc1a6048cc2a3;hp=9e74b1f1415822c758ccc81bd4f12dc15a16eaee;hpb=11a1a49a16a52ff9b684a430d68b8982ed313427;p=git.git diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 9e74b1f14..64f05080b 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -694,6 +694,34 @@ test_expect_success 'set --bool-or-int' ' rm .git/config +cat >expect <<\EOF +[path] + home = ~/ + normal = /dev/null + trailingtilde = foo~ +EOF + +test_expect_success 'set --path' ' + git config --path path.home "~/" && + git config --path path.normal "/dev/null" && + git config --path path.trailingtilde "foo~" && + test_cmp expect .git/config' + +cat >expect < result && + git config --get --path path.normal >> result && + git config --get --path path.trailingtilde >> result && + test_cmp expect result +' + +rm .git/config + git config quote.leading " test" git config quote.ending "test " git config quote.semicolon "test;test" @@ -796,4 +824,12 @@ test_expect_success 'check split_cmdline return' " test_must_fail git merge master " +test_expect_success 'git -c "key=value" support' ' + test "z$(git -c name=value config name)" = zvalue && + test "z$(git -c core.name=value config core.name)" = zvalue && + test "z$(git -c CamelCase=value config camelcase)" = zvalue && + test "z$(git -c flag config --bool flag)" = ztrue && + test_must_fail git -c core.name=value config name +' + test_done