MCPcopy Create free account
hub / github.com/git/git / test_urlmatch_normalization__dots

Function test_urlmatch_normalization__dots

t/unit-tests/u-urlmatch-normalization.c:212–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void test_urlmatch_normalization__dots(void)
213{
214 check_normalized_url("x://y/.", "x://y/");
215 check_normalized_url("x://y/./", "x://y/");
216 check_normalized_url("x://y/a/.", "x://y/a");
217 check_normalized_url("x://y/a/./", "x://y/a/");
218 check_normalized_url("x://y/.?", "x://y/?");
219 check_normalized_url("x://y/./?", "x://y/?");
220 check_normalized_url("x://y/a/.?", "x://y/a?");
221 check_normalized_url("x://y/a/./?", "x://y/a/?");
222 check_normalized_url("x://y/a/./b/.././../c", "x://y/c");
223 check_normalized_url("x://y/a/./b/../.././c/", "x://y/c/");
224 check_normalized_url("x://y/a/./b/.././../c/././.././.", "x://y/");
225 check_url_normalizable("x://y/a/./b/.././../c/././.././..", 0);
226 check_normalized_url("x://y/a/./?/././..", "x://y/a/?/././..");
227 check_normalized_url("x://y/%2e/", "x://y/");
228 check_normalized_url("x://y/%2E/", "x://y/");
229 check_normalized_url("x://y/a/%2e./", "x://y/");
230 check_normalized_url("x://y/b/.%2E/", "x://y/");
231 check_normalized_url("x://y/c/%2e%2E/", "x://y/");
232}
233
234/*
235 * "http://@foo" specifies an empty user name but does not specify a password.

Callers

nothing calls this directly

Calls 2

check_normalized_urlFunction · 0.85
check_url_normalizableFunction · 0.85

Tested by

no test coverage detected