diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-29 18:52:36 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-29 18:52:36 +0000 |
commit | e7c7f19c4e46e48d577964f4e020a4feb08b581a (patch) | |
tree | a0aea6f52766b9ae190c259e1ccd9b9faf292059 /regress/iri_test.c | |
parent | cef60084e65c78ec736d3d6d1d9c383fd424d693 (diff) |
more IRI tests
ensure non-encoded and pct-encoded hostnames are parsed correctly
Diffstat (limited to 'regress/iri_test.c')
-rw-r--r-- | regress/iri_test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/regress/iri_test.c b/regress/iri_test.c index 4710530..a662e79 100644 --- a/regress/iri_test.c +++ b/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", |