authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-24 14:07:21 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-24 14:07:21 -08:00
log947aa51d3d1ae9acb82beb7abe5309eb265f7461
treef176aa7c9f2e1b828da5ba8c21d7c9bf1c8dcbdd
parentf968d9c2d230b94a21a164c4b306d523679ca324

fetch urltestdata.json


3 files changed, 3 insertions(+), 4 deletions(-)

README.md-3
......@@ -9,6 +9,3 @@
99A WHATWG URL-compatible parser for Zig.
1010
1111https://url.spec.whatwg.org/
12
13`urltestdata.json` is from https://github.com/web-platform-tests/wpt/blob/master/url/resources/urltestdata.json.
14Last fetched at `048018b5af85f8d47b8a704b48cf6f9c0a461876`.
generate.ts+1-1
......@@ -1,4 +1,4 @@
1import casesraw from "./urltestdata.json";
1const casesraw = await fetch("https://github.com/web-platform-tests/wpt/raw/master/url/resources/urltestdata.json").then((x) => x.json());
22const casesidna = await fetch("https://github.com/web-platform-tests/wpt/raw/master/url/resources/IdnaTestV2.json").then((x) => x.json());
33
44const cases = casesraw.filter((v) => typeof v !== "string");
zig-out/test.zig+2
......@@ -427,6 +427,8 @@ test { try parsePass("http://foo.bar/baz?qux#foo<bar", null, "http://foo.bar/baz
427427test { try parsePass("http://foo.bar/baz?qux#foo>bar", null, "http://foo.bar/baz?qux#foo%3Ebar", "http://foo.bar", "http:", "", "", "foo.bar", "foo.bar", "", "/baz", "?qux", "#foo%3Ebar"); }
428428test { try parsePass("http://foo.bar/baz?qux#foo`bar", null, "http://foo.bar/baz?qux#foo%60bar", "http://foo.bar", "http:", "", "", "foo.bar", "foo.bar", "", "/baz", "?qux", "#foo%60bar"); }
429429test { try parsePass("https://0x.0x.0", null, "https://0.0.0.0/", "https://0.0.0.0", "https:", "", "", "0.0.0.0", "0.0.0.0", "", "/", "", ""); }
430test { try parsePass("https://0x.0x.0x.0x", null, "https://0.0.0.0/", "https://0.0.0.0", "https:", "", "", "0.0.0.0", "0.0.0.0", "", "/", "", ""); }
431test { try parsePass("https://00.00.00.00", null, "https://0.0.0.0/", "https://0.0.0.0", "https:", "", "", "0.0.0.0", "0.0.0.0", "", "/", "", ""); }
430432test { try parsePass("file:///C%3A/", null, "file:///C%3A/", "", "file:", "", "", "", "", "", "/C%3A/", "", ""); }
431433test { try parsePass("file:///C%7C/", null, "file:///C%7C/", "", "file:", "", "", "", "", "", "/C%7C/", "", ""); }
432434test { try parsePass("asdf://%43%7C/", null, "asdf://%43%7C/", "null", "asdf:", "", "", "%43%7C", "%43%7C", "", "/", "", ""); }