Commit Diff
Commit:
e681c648985bad74ff7037fd06d4c65ae580e696
From:
Omar Polo <op@omarpolo.com>
Date:
Mon Dec 26 18:13:06 2022 UTC
Message
add some extra tests for the iri parser
commit - e32788429f6cf0fd61336ed3eadccfc59f17dbbc
commit + e681c648985bad74ff7037fd06d4c65ae580e696
blob - 4ea3e341eac2e5da3dbb6b8d98bde95e82e0d7de
blob + 3d2c4638d866aeeb6b137c6a5035cf42ed606314
--- test/iritest.c
+++ test/iritest.c
@@ -152,12 +152,18 @@ main(void)
/* extra tests */
- base = "gemini://a/b/c";
+ ret |= resolve(base, "gopher://b:70", "gopher://b:70/");
+ base = "gemini://a/b/c";
ret |= setquery(base, "hw", "gemini://a/b/c?hw");
ret |= setquery(base, "h w", "gemini://a/b/c?h%20w");
ret |= setquery(base, "100%", "gemini://a/b/c?100%25");
ret |= setquery(base, "%20", "gemini://a/b/c?%2520");
+ base = "gemini://a/?foo+bar";
+ ret |= setquery(base, "foo", "gemini://a/?foo");
+ ret |= setquery(base, "%20", "gemini://a/?%2520");
+ ret |= setquery(base, "%20%20%20", "gemini://a/?%2520%2520%2520");
+
return (ret);
}
Omar Polo