| author | |
| committer | |
| log | a8eff70a99f05c0837b60b138c395b0f6d4000ff |
| tree | f28083a06a39671bedef76b1841397cb2d5afe20 |
| parent | cc06e6709bb5af14867d8cdd82daebbe7f4b22a8 |
3 files changed, 4 insertions(+), 2 deletions(-)
generate.ts+1-1| ... | ... | @@ -54,7 +54,7 @@ pub fn parsePass(input: []const u8, base: ?[]const u8, href: []const u8, origin: |
| 54 | 54 | try expect(u.password).toEqualString(password); |
| 55 | 55 | _ = host; |
| 56 | 56 | _ = hostname; |
| 57 | _ = port; | |
| 57 | try expect(u.port).toEqualString(port); | |
| 58 | 58 | _ = pathname; |
| 59 | 59 | _ = search; |
| 60 | 60 | _ = hash; |
url.zig+2| ... | ... | @@ -10,6 +10,7 @@ pub const URL = struct { |
| 10 | 10 | protocol: []const u8, |
| 11 | 11 | username: []const u8, |
| 12 | 12 | password: []const u8, |
| 13 | port: []const u8, | |
| 13 | 14 | |
| 14 | 15 | pub const HostKind = enum { |
| 15 | 16 | name, |
| ... | ... | @@ -783,6 +784,7 @@ pub const URL = struct { |
| 783 | 784 | .protocol = _href[0..extras.sum(usize, href.lengths[0..2])], |
| 784 | 785 | .username = _href[extras.sum(usize, href.lengths[0..2])..][0..href.lengths[3]], |
| 785 | 786 | .password = _href[extras.sum(usize, href.lengths[0..4])..][0..href.lengths[5]], |
| 787 | .port = _href[extras.sum(usize, href.lengths[0..8])..][0..href.lengths[9]], | |
| 786 | 788 | }; |
| 787 | 789 | return url; |
| 788 | 790 | } |
zig-out/test.zig+1-1| ... | ... | @@ -24,7 +24,7 @@ pub fn parsePass(input: []const u8, base: ?[]const u8, href: []const u8, origin: |
| 24 | 24 | try expect(u.password).toEqualString(password); |
| 25 | 25 | _ = host; |
| 26 | 26 | _ = hostname; |
| 27 | _ = port; | |
| 27 | try expect(u.port).toEqualString(port); | |
| 28 | 28 | _ = pathname; |
| 29 | 29 | _ = search; |
| 30 | 30 | _ = hash; |