]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1300-repo-config.sh
Auto-quote config values in config.c:store_write_pair()
[thirdparty/git.git] / t / t1300-repo-config.sh
index a29caa06dc6545b7fc23b3446a713b75f49cd146..60acdd368bfcb6ccb4698f6fd7533dd25befd9b0 100755 (executable)
@@ -401,5 +401,22 @@ test_expect_success numbers '
        test z1048576 = "z$m"
 '
 
+rm .git/config
+
+git-repo-config quote.leading " test"
+git-repo-config quote.ending "test "
+git-repo-config quote.semicolon "test;test"
+git-repo-config quote.hash "test#test"
+
+cat > expect << EOF
+[quote]
+       leading = " test"
+       ending = "test "
+       semicolon = "test;test"
+       hash = "test#test"
+EOF
+
+test_expect_success 'quoting' 'cmp .git/config expect'
+
 test_done