Skip to content

Commit 732f934

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3fa0e04 commit 732f934

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t1300-config.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,8 @@ test_expect_success 'urlmatch favors more specific URLs' '
14081408
cookieFile = /tmp/wildcard.txt
14091409
[http "https://*.example.com/wildcardwithsubdomain"]
14101410
cookieFile = /tmp/wildcardwithsubdomain.txt
1411+
[http "https://*.example.*"]
1412+
cookieFile = /tmp/multiwildcard.txt
14111413
[http "https://trailing.example.com"]
14121414
cookieFile = /tmp/trailing.txt
14131415
[http "https://user@*.example.com/"]
@@ -1454,6 +1456,10 @@ test_expect_success 'urlmatch favors more specific URLs' '
14541456
14551457
echo http.cookiefile /tmp/sub.txt >expect &&
14561458
git config --get-urlmatch HTTP https://[email protected] >actual &&
1459+
test_cmp expect actual &&
1460+
1461+
echo http.cookiefile /tmp/multiwildcard.txt >expect &&
1462+
git config --get-urlmatch HTTP https://wildcard.example.org >actual &&
14571463
test_cmp expect actual
14581464
'
14591465

0 commit comments

Comments
 (0)