summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-01-10 08:52:41 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-10 08:52:41 -0800
commit9c787f3f88f077ad23498cf03b1b57ac3bd41b33 (patch)
treec559f25a5ea815eb59e77ff56bedfbada07a9e1d /t
parentMerge branch 'pm/cvs-environ' (diff)
parentbuiltin-config: add --path option doing ~ and ~user expansion. (diff)
downloadtgif-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 83b7294010..f89d7e9e49 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"