summaryrefslogtreecommitdiff
path: root/t/t1300-config-set.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1300-config-set.sh')
-rw-r--r--t/t1300-config-set.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t1300-config-set.sh b/t/t1300-config-set.sh
index 59b6c4c85d..7a5849ae66 100644
--- a/t/t1300-config-set.sh
+++ b/t/t1300-config-set.sh
@@ -248,5 +248,24 @@ test_expect_failure 'invalid key' 'git-config-set inval.2key blabla'
test_expect_success 'correct key' 'git-config-set 123456.a123 987'
+test_expect_success 'hierarchical section' \
+ 'git-config-set 1.2.3.alpha beta'
+
+cat > expect << EOF
+[beta] ; silly comment # another comment
+noIndent= sillyValue ; 'nother silly comment
+
+# empty line
+ ; comment
+[nextSection]
+ NoNewLine = wow2 for me
+[123456]
+ a123 = 987
+[1.2.3]
+ alpha = beta
+EOF
+
+test_expect_success 'hierarchical section value' 'cmp .git/config expect'
+
test_done