Skip to content

Commit 54440ea

Browse files
authored
Merge pull request #516 from ChALkeR/chalker/ipv6
More ipv6 tests to increase coverage
2 parents e7b22e1 + 1649470 commit 54440ea

File tree

6 files changed

+90
-0
lines changed

6 files changed

+90
-0
lines changed

tests/draft-future/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

tests/draft2019-09/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

tests/draft2020-12/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

tests/draft4/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

tests/draft6/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

tests/draft7/optional/format/ipv6.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
"data": "12345::",
4444
"valid": false
4545
},
46+
{
47+
"description": "trailing 4 hex symbols is valid",
48+
"data": "::abef",
49+
"valid": true
50+
},
51+
{
52+
"description": "trailing 5 hex symbols is invalid",
53+
"data": "::abcef",
54+
"valid": false
55+
},
4656
{
4757
"description": "an IPv6 address with too many components",
4858
"data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
@@ -83,6 +93,11 @@
8393
"data": ":2:3:4::8",
8494
"valid": false
8595
},
96+
{
97+
"description": "single set of double colons in the middle is valid",
98+
"data": "1:d6::42",
99+
"valid": true
100+
},
86101
{
87102
"description": "two sets of double colons is invalid",
88103
"data": "1::d6::42",

0 commit comments

Comments
 (0)