more IRI tests

ensure non-encoded and pct-encoded hostnames are parsed correctly
This commit is contained in:
Omar Polo 2021-01-29 18:52:36 +00:00
parent cef60084e6
commit e7c7f19c4e
1 changed files with 12 additions and 0 deletions

View File

@ -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",