src/vs/workbench/contrib/url/common/urlGlob.ts/testUrlMatchesGlob
export const testUrlMatchesGlob = (uri: URI, globUrl: string): boolean => {
	let url = uri.with({ query: null, fragment: null }).toString(true);
	const normalize = (url: string) => url.replace(/\/+$/, '');
	globUrl = normalize(globUrl);
	url = normalize(url);

	const memo = Array.from({ length: url.length + 1 }).map(() =>
		Array.from({ length: globUrl.length + 1 }).map(() => undefined),
	);

	if (/^[^./:]*:\/\//.test(globUrl)) {
		return doUrlMatch(memo, url, globUrl, 0, 0);
	}

	const scheme = /^(https?):\/\//.exec(url)?.[1];
	if (scheme) {
		return doUrlMatch(memo, url, `${scheme}://${globUrl}`, 0, 0);
	}

	return false;
};