Skip to content

some more ipv6 tests #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions tests/draft2019-09/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
"data": "d6::",
"valid": true
},
{
"description": "missing leading octet is invalid",
"data": ":2:3:4:5:6:7:8",
"valid": false
},
{
"description": "missing trailing octet is invalid",
"data": "1:2:3:4:5:6:7:",
"valid": false
},
{
"description": "missing leading octet with omitted octets later",
"data": ":2:3:4::8",
"valid": false
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
Expand All @@ -62,6 +77,41 @@
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
},
{
"description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
"data": "::ffff:192.168.0.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't already covered by "mixed format with the ipv4 section as decimal octets"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quite.. I'll amend the test description.

"valid": true
},
{
"description": "triple colons is invalid",
"data": "1:2:3:4:5:::8",
"valid": false
},
{
"description": "8 octets",
"data": "1:2:3:4:5:6:7:8",
"valid": true
},
{
"description": "insufficient octets without double colons",
"data": "1:2:3:4:5:6:7",
"valid": false
},
{
"description": "no colons is invalid",
"data": "1",
"valid": false
},
{
"description": "ipv4 is not ipv6",
"data": "127.0.0.1",
"valid": false
},
{
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
}
]
}
Expand Down
52 changes: 51 additions & 1 deletion tests/draft4/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@
},
{
"description": "leading colons is valid",
"data": "::1",
"data": "::42:ff:1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "missing leading octet is invalid",
"data": ":2:3:4:5:6:7:8",
"valid": false
},
{
"description": "missing trailing octet is invalid",
"data": "1:2:3:4:5:6:7:",
"valid": false
},
{
"description": "missing leading octet with omitted octets later",
"data": ":2:3:4::8",
"valid": false
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
Expand All @@ -62,6 +77,41 @@
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
},
{
"description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
"data": "::ffff:192.168.0.1",
"valid": true
},
{
"description": "triple colons is invalid",
"data": "1:2:3:4:5:::8",
"valid": false
},
{
"description": "8 octets",
"data": "1:2:3:4:5:6:7:8",
"valid": true
},
{
"description": "insufficient octets without double colons",
"data": "1:2:3:4:5:6:7",
"valid": false
},
{
"description": "no colons is invalid",
"data": "1",
"valid": false
},
{
"description": "ipv4 is not ipv6",
"data": "127.0.0.1",
"valid": false
},
{
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
}
]
}
Expand Down
52 changes: 51 additions & 1 deletion tests/draft6/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@
},
{
"description": "leading colons is valid",
"data": "::1",
"data": "::42:ff:1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "missing leading octet is invalid",
"data": ":2:3:4:5:6:7:8",
"valid": false
},
{
"description": "missing trailing octet is invalid",
"data": "1:2:3:4:5:6:7:",
"valid": false
},
{
"description": "missing leading octet with omitted octets later",
"data": ":2:3:4::8",
"valid": false
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
Expand All @@ -62,6 +77,41 @@
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
},
{
"description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
"data": "::ffff:192.168.0.1",
"valid": true
},
{
"description": "triple colons is invalid",
"data": "1:2:3:4:5:::8",
"valid": false
},
{
"description": "8 octets",
"data": "1:2:3:4:5:6:7:8",
"valid": true
},
{
"description": "insufficient octets without double colons",
"data": "1:2:3:4:5:6:7",
"valid": false
},
{
"description": "no colons is invalid",
"data": "1",
"valid": false
},
{
"description": "ipv4 is not ipv6",
"data": "127.0.0.1",
"valid": false
},
{
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
}
]
}
Expand Down
52 changes: 51 additions & 1 deletion tests/draft7/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@
},
{
"description": "leading colons is valid",
"data": "::1",
"data": "::42:ff:1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "missing leading octet is invalid",
"data": ":2:3:4:5:6:7:8",
"valid": false
},
{
"description": "missing trailing octet is invalid",
"data": "1:2:3:4:5:6:7:",
"valid": false
},
{
"description": "missing leading octet with omitted octets later",
"data": ":2:3:4::8",
"valid": false
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
Expand All @@ -62,6 +77,41 @@
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
},
{
"description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
"data": "::ffff:192.168.0.1",
"valid": true
},
{
"description": "triple colons is invalid",
"data": "1:2:3:4:5:::8",
"valid": false
},
{
"description": "8 octets",
"data": "1:2:3:4:5:6:7:8",
"valid": true
},
{
"description": "insufficient octets without double colons",
"data": "1:2:3:4:5:6:7",
"valid": false
},
{
"description": "no colons is invalid",
"data": "1",
"valid": false
},
{
"description": "ipv4 is not ipv6",
"data": "127.0.0.1",
"valid": false
},
{
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
}
]
}
Expand Down