Skip to content

some more tests for the "ipv6" format #400

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

Closed
wants to merge 1 commit into from
Closed
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
40 changes: 40 additions & 0 deletions tests/draft2019-09/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@
"description": "an IPv6 address containing illegal characters",
"data": "::laptop",
"valid": false
},
{
"description": "no digits is valid",
"data": "::",
"valid": true
},
{
"description": "leading colons is valid",
"data": "::1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
"valid": false
},
{
"description": "mixed format with the ipv4 section as decimal octets",
"data": "1::d6:192.168.0.1",
"valid": true
},
{
"description": "mixed format with double colons between the sections",
"data": "1:2::192.168.0.1",
"valid": true
},
{
"description": "mixed format with ipv4 section with octet out of range",
"data": "1::2:192.168.256.1",
"valid": false
},
{
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
}
]
}
Expand Down
40 changes: 40 additions & 0 deletions tests/draft3/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@
"description": "an IPv6 address containing illegal characters",
"data": "::laptop",
"valid": false
},
{
"description": "no digits is valid",
"data": "::",
"valid": true
},
{
"description": "leading colons is valid",
"data": "::1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
"valid": false
},
{
"description": "mixed format with the ipv4 section as decimal octets",
"data": "1::d6:192.168.0.1",
"valid": true
},
{
"description": "mixed format with double colons between the sections",
"data": "1:2::192.168.0.1",
"valid": true
},
{
"description": "mixed format with ipv4 section with octet out of range",
"data": "1::2:192.168.256.1",
"valid": false
},
{
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
}
]
}
Expand Down
40 changes: 40 additions & 0 deletions tests/draft4/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@
"description": "an IPv6 address containing illegal characters",
"data": "::laptop",
"valid": false
},
{
"description": "no digits is valid",
"data": "::",
"valid": true
},
{
"description": "leading colons is valid",
"data": "::1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
"valid": false
},
{
"description": "mixed format with the ipv4 section as decimal octets",
"data": "1::d6:192.168.0.1",
"valid": true
},
{
"description": "mixed format with double colons between the sections",
"data": "1:2::192.168.0.1",
"valid": true
},
{
"description": "mixed format with ipv4 section with octet out of range",
"data": "1::2:192.168.256.1",
"valid": false
},
{
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
}
]
}
Expand Down
40 changes: 40 additions & 0 deletions tests/draft6/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@
"description": "an IPv6 address containing illegal characters",
"data": "::laptop",
"valid": false
},
{
"description": "no digits is valid",
"data": "::",
"valid": true
},
{
"description": "leading colons is valid",
"data": "::1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
"valid": false
},
{
"description": "mixed format with the ipv4 section as decimal octets",
"data": "1::d6:192.168.0.1",
"valid": true
},
{
"description": "mixed format with double colons between the sections",
"data": "1:2::192.168.0.1",
"valid": true
},
{
"description": "mixed format with ipv4 section with octet out of range",
"data": "1::2:192.168.256.1",
"valid": false
},
{
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
}
]
}
Expand Down
40 changes: 40 additions & 0 deletions tests/draft7/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@
"description": "an IPv6 address containing illegal characters",
"data": "::laptop",
"valid": false
},
{
"description": "no digits is valid",
"data": "::",
"valid": true
},
{
"description": "leading colons is valid",
"data": "::1",
"valid": true
},
{
"description": "trailing colons is valid",
"data": "d6::",
"valid": true
},
{
"description": "two sets of double colons is invalid",
"data": "1::d6::42",
"valid": false
},
{
"description": "mixed format with the ipv4 section as decimal octets",
"data": "1::d6:192.168.0.1",
"valid": true
},
{
"description": "mixed format with double colons between the sections",
"data": "1:2::192.168.0.1",
"valid": true
},
{
"description": "mixed format with ipv4 section with octet out of range",
"data": "1::2:192.168.256.1",
"valid": false
},
{
"description": "mixed format with ipv4 section with a hex octet",
"data": "1::2:192.168.ff.1",
"valid": false
}
]
}
Expand Down