Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <bk2204@github.com>2020-02-20 05:24:10 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-21 00:05:43 +0300
commit732f93440831a9253ad5b9bd16a81e25e1901f22 (patch)
treead82d246ee2c895679a83475ec135697fda85e40 /t/t1300-config.sh
parent3fa0e046679b69ee7039a60674e9b16f83780e85 (diff)
t1300: add test for urlmatch with multiple wildcards
Our urlmatch code handles multiple wildcards, but we don't currently have a test that checks this code path. Add a test that we handle this case correctly to avoid any regressions. Signed-off-by: brian m. carlson <bk2204@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-xt/t1300-config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 983a0a1583..8b0cac80a3 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -1408,6 +1408,8 @@ test_expect_success 'urlmatch favors more specific URLs' '
cookieFile = /tmp/wildcard.txt
[http "https://*.example.com/wildcardwithsubdomain"]
cookieFile = /tmp/wildcardwithsubdomain.txt
+ [http "https://*.example.*"]
+ cookieFile = /tmp/multiwildcard.txt
[http "https://trailing.example.com"]
cookieFile = /tmp/trailing.txt
[http "https://user@*.example.com/"]
@@ -1454,6 +1456,10 @@ test_expect_success 'urlmatch favors more specific URLs' '
echo http.cookiefile /tmp/sub.txt >expect &&
git config --get-urlmatch HTTP https://user@sub.example.com >actual &&
+ test_cmp expect actual &&
+
+ echo http.cookiefile /tmp/multiwildcard.txt >expect &&
+ git config --get-urlmatch HTTP https://wildcard.example.org >actual &&
test_cmp expect actual
'