diff --git a/README.md b/README.md index 60bef9defae5c12b1684d35230e299957cd1cac6..78b6bcd5998b434bc463f12cff4972261021195a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,3 @@ A WHATWG URL-compatible parser for Zig. https://url.spec.whatwg.org/ - -`urltestdata.json` is from https://github.com/web-platform-tests/wpt/blob/master/url/resources/urltestdata.json. -Last fetched at `048018b5af85f8d47b8a704b48cf6f9c0a461876`. diff --git a/generate.ts b/generate.ts index 93f022f186950f9c3c73e0f30b9df21eebd2dfb2..1e11d084b242278a988032f87d567c8a038cda2d 100644 --- a/generate.ts +++ b/generate.ts @@ -1,4 +1,4 @@ -import casesraw from "./urltestdata.json"; +const casesraw = await fetch("https://github.com/web-platform-tests/wpt/raw/master/url/resources/urltestdata.json").then((x) => x.json()); const casesidna = await fetch("https://github.com/web-platform-tests/wpt/raw/master/url/resources/IdnaTestV2.json").then((x) => x.json()); const cases = casesraw.filter((v) => typeof v !== "string"); diff --git a/zig-out/test.zig b/zig-out/test.zig index beb6d73addcefa6eddf5ce135dd515dec62ae318..f3d3a74e8d6b8688df164a11ec878896a9f79f23 100644 --- a/zig-out/test.zig +++ b/zig-out/test.zig @@ -427,6 +427,8 @@ test { try parsePass("http://foo.bar/baz?qux#foobar", null, "http://foo.bar/baz?qux#foo%3Ebar", "http://foo.bar", "http:", "", "", "foo.bar", "foo.bar", "", "/baz", "?qux", "#foo%3Ebar"); } test { 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"); } test { 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", "", "/", "", ""); } +test { 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", "", "/", "", ""); } +test { 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", "", "/", "", ""); } test { try parsePass("file:///C%3A/", null, "file:///C%3A/", "", "file:", "", "", "", "", "", "/C%3A/", "", ""); } test { try parsePass("file:///C%7C/", null, "file:///C%7C/", "", "file:", "", "", "", "", "", "/C%7C/", "", ""); } test { try parsePass("asdf://%43%7C/", null, "asdf://%43%7C/", "null", "asdf:", "", "", "%43%7C", "%43%7C", "", "/", "", ""); }