commit e7c7f19c4e46e48d577964f4e020a4feb08b581a from: Omar Polo date: Fri Jan 29 18:52:36 2021 UTC more IRI tests ensure non-encoded and pct-encoded hostnames are parsed correctly commit - cef60084e65c78ec736d3d6d1d9c383fd424d693 commit + e7c7f19c4e46e48d577964f4e020a4feb08b581a blob - 47105308723788f30ac53717906551be5e96de73 blob + a662e79b16bb43d7de7d908265ec6ab5a51ccc4e --- regress/iri_test.c +++ regress/iri_test.c @@ -132,6 +132,18 @@ main(void) PASS, IRI("gemini", "omarpolo.com", "", "", "", ""), "host is case-insensitive"); + TEST("gemini://xn--nave-6pa.omarpolo.com", + PASS, + IRI("gemini", "xn--nave-6pa.omarpolo.com", "", "", "", ""), + "Can parse punycode-encoded hostnames"); + TEST("gemini://naïve.omarpolo.com", + PASS, + IRI("gemini", "naïve.omarpolo.com", "", "", "", ""), + "Accept non punycode-encoded hostnames"); + TEST("gemini://na%c3%afve.omarpolo.com", + PASS, + IRI("gemini", "naïve.omarpolo.com", "", "", "", ""), + "Can percent decode hostnames"); /* path */ TEST("gemini://omarpolo.com/foo/bar/baz",