Merge branch 'jn/post-receive-utf8'
[gitweb.git] / t / t1300-repo-config.sh
index c4a7d84f46fd218af1824ac1f78a1e9f4cb15cec..c23f4781e102425d3bcc1de69cf48fc79e15509b 100755 (executable)
@@ -1087,6 +1087,31 @@ test_expect_success 'barf on incomplete string' '
        grep " line 3 " error
 '
 
+test_expect_success 'urlmatch' '
+       cat >.git/config <<-\EOF &&
+       [http]
+               sslVerify
+       [http "https://weak.example.com"]
+               sslVerify = false
+               cookieFile = /tmp/cookie.txt
+       EOF
+
+       echo true >expect &&
+       git config --bool --get-urlmatch http.SSLverify https://good.example.com >actual &&
+       test_cmp expect actual &&
+
+       echo false >expect &&
+       git config --bool --get-urlmatch http.sslverify https://weak.example.com >actual &&
+       test_cmp expect actual &&
+
+       {
+               echo http.cookiefile /tmp/cookie.txt &&
+               echo http.sslverify false
+       } >expect &&
+       git config --get-urlmatch HTTP https://weak.example.com >actual &&
+       test_cmp expect actual
+'
+
 # good section hygiene
 test_expect_failure 'unsetting the last key in a section removes header' '
        cat >.git/config <<-\EOF &&