aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/url.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/url.zig b/src/url.zig
index 7ce94cf4f..c212c3fe2 100644
--- a/src/url.zig
+++ b/src/url.zig
@@ -1440,6 +1440,15 @@ test "URL - parse" {
try expectString("0.0.0.0:3000", url.host);
try expectString("0.0.0.0", url.hostname);
try expectString("3000", url.port);
+
+ url = URL.parse("http://admin:password@0.0.0.0:3000/@bacon");
+ try expectString("http", url.protocol);
+ try expectString("admin", url.username);
+ try expectString("password", url.password);
+ try expectString("0.0.0.0:3000", url.host);
+ try expectString("0.0.0.0", url.hostname);
+ try expectString("3000", url.port);
+ try expectString("/@bacon", url.pathname);
}
test "URL - joinAlloc" {