aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-10 08:52:41 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-10 08:52:41 -0800
commit9c787f3f88f077ad23498cf03b1b57ac3bd41b33 (patch)
treec559f25a5ea815eb59e77ff56bedfbada07a9e1d /t
parentdf248216fd0602e06d3b441e46efa6c74b94d081 (diff)
parent1349484e341a3ec2ba02a86c8fbd97ea9dc8c756 (diff)
downloadgit-9c787f3f88f077ad23498cf03b1b57ac3bd41b33.tar.gz
git-9c787f3f88f077ad23498cf03b1b57ac3bd41b33.tar.xz
Merge branch 'mm/config-path'
* mm/config-path: builtin-config: add --path option doing ~ and ~user expansion.
Diffstat (limited to 't')
-rwxr-xr-xt/t1300-repo-config.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 83b729401..f89d7e9e4 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -683,6 +683,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 <<EOF
+$HOME/
+/dev/null
+foo~
+EOF
+
+test_expect_success 'get --path' '
+ git config --get --path path.home > 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"