summaryrefslogtreecommitdiff
path: root/json/tests/draft3/optional/format/ipv6.json
blob: 131edb827ef15dfaf33f8c45b1ad11e292187bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[
    {
        "description": "validation of IPv6 addresses",
        "schema": {"format": "ipv6"},
        "tests": [
            {
                "description": "a valid IPv6 address",
                "data": "::1",
                "valid": true
            },
            {
                "description": "an IPv6 address with out-of-range values",
                "data": "12345::",
                "valid": false
            },
            {
                "description": "an IPv6 address with too many components",
                "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
                "valid": false
            },
            {
                "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
            }
        ]
    }
]