| ... | @@ -48,6 +48,17 @@ test "parse and render IPv6 addresses" { | ... | @@ -48,6 +48,17 @@ test "parse and render IPv6 addresses" { |
| 48 | testing.expectError(error.Incomplete, net.Address.parseIp6("FF01:", 0)); | 48 | testing.expectError(error.Incomplete, net.Address.parseIp6("FF01:", 0)); |
| 49 | testing.expectError(error.InvalidIpv4Mapping, net.Address.parseIp6("::123.123.123.123", 0)); | 49 | testing.expectError(error.InvalidIpv4Mapping, net.Address.parseIp6("::123.123.123.123", 0)); |
| 50 | testing.expectError(error.Incomplete, net.Address.resolveIp6("ff01::fb%", 0)); | 50 | testing.expectError(error.Incomplete, net.Address.resolveIp6("ff01::fb%", 0)); |
| | 51 | testing.expectError(error.Overflow, net.Address.resolveIp6("ff01::fb%wlp3s0s0s0s0s0s0s0s0", 0)); |
| | 52 | testing.expectError(error.Overflow, net.Address.resolveIp6("ff01::fb%12345678901234", 0)); |
| | 53 | } |
| | 54 | |
| | 55 | test "invalid but parseable IPv6 scope ids" { |
| | 56 | // Currently, resolveIp6 with alphanumerical scope IDs only works on Linux. |
| | 57 | if (std.builtin.os.tag != .linux) { |
| | 58 | return error.SkipZigTest; |
| | 59 | } |
| | 60 | |
| | 61 | testing.expectError(error.InterfaceNotFound, net.Address.resolveIp6("ff01::fb%123s45678901234", 0)); |
| 51 | } | 62 | } |
| 52 | | 63 | |
| 53 | test "parse and render IPv4 addresses" { | 64 | test "parse and render IPv4 addresses" { |