Skip to content

Commit 0366226

Browse files
some more ipv6 tests
1 parent 1d5c3c0 commit 0366226

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,46 @@
6262
"description": "mixed format with ipv4 section with a hex octet",
6363
"data": "1::2:192.168.ff.1",
6464
"valid": false
65+
},
66+
{
67+
"description": "triple colons is invalid",
68+
"data": "1:2:3:4:5:::8",
69+
"valid": false
70+
},
71+
{
72+
"description": "8 octets",
73+
"data": "1:2:3:4:5:6:7:8",
74+
"valid": true
75+
},
76+
{
77+
"description": "insufficient octets without double colons",
78+
"data": "1:2:3:4:5:6:7",
79+
"valid": false
80+
},
81+
{
82+
"description": "ipv4 is not ipv6",
83+
"data": "127.0.0.1",
84+
"valid": false
85+
},
86+
{
87+
"description": "missing leading octet is invalid",
88+
"data": ":2:3:4:5:6:7:8",
89+
"valid": false
90+
},
91+
{
92+
"description": "missing trailing octet is invalid",
93+
"data": "1:2:3:4:5:6:7:",
94+
"valid": false
95+
},
96+
{
97+
"description": "missing leading octet with omitted octets later",
98+
"data": ":2:3:4::8",
99+
"valid": false
100+
},
101+
{
102+
"description": "ipv4 segment must have 4 octets",
103+
"data": "1:2:3:4:1.2.3",
104+
"valid": false
65105
}
66106
]
67107
}

0 commit comments

Comments
 (0)