]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1300-config-set.sh
Allow hierarchical section names
[thirdparty/git.git] / t / t1300-config-set.sh
index 59b6c4c85d5ff2d0a16437edb016785ce3130818..7a5849ae6634777b1d34ff98f8f75d8ac8a0a194 100644 (file)
@@ -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