| ... | ... | @@ -532,7 +532,6 @@ test "ipv6: parse & format" { |
| 532 | 532 | "::1234:5678", |
| 533 | 533 | "2001:db8::1234:5678", |
| 534 | 534 | "::ffff:123.5.123.5", |
| 535 | | "FF01::FB%lo", |
| 536 | 535 | }; |
| 537 | 536 | |
| 538 | 537 | const outputs = [_][]const u8{ |
| ... | ... | @@ -544,6 +543,21 @@ test "ipv6: parse & format" { |
| 544 | 543 | "::1234:5678", |
| 545 | 544 | "2001:db8::1234:5678", |
| 546 | 545 | "::ffff:123.5.123.5", |
| 546 | }; |
| 547 | |
| 548 | for (inputs) |input, i| { |
| 549 | try testing.expectFmt(outputs[i], "{}", .{try IPv6.parse(input)}); |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | test "ipv6: parse & format addresses with scope ids" { |
| 554 | if (!@hasDecl(os, "IFNAMESIZE")) return error.SkipZigTest; |
| 555 | |
| 556 | const inputs = [_][]const u8{ |
| 557 | "FF01::FB%lo", |
| 558 | }; |
| 559 | |
| 560 | const outputs = [_][]const u8{ |
| 547 | 561 | "ff01::fb%1", |
| 548 | 562 | }; |
| 549 | 563 | |