diff options
author | Julian Berman <Julian@GrayVines.com> | 2021-10-07 09:13:10 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2021-10-07 09:13:10 -0400 |
commit | cf886386cc0996df6743b425f74675a6d8a1a9ca (patch) | |
tree | 9bdbb6a0fccd0d20fd6500c77cc0d45315ab63d3 /tests/draft-future/optional/format/ipv6.json | |
parent | b5e545b0e0a3a614562293fd7755cd8d2283e8d2 (diff) | |
download | jsonschema-cf886386cc0996df6743b425f74675a6d8a1a9ca.tar.gz |
Squashed 'json/' changes from 20c1bb1d9..54440eab4
54440eab4 Merge pull request #516 from ChALkeR/chalker/ipv6
e7b22e1c6 Fix the sanity check by pinning.
8891d8107 Merge pull request #519 from json-schema-org/ether/custom-dialect
5f5fccda3 test the format-assertion vocabulary with a custom metaschema
3fcee3868 Merge pull request #512 from json-schema-org/ether/formats-and-non-strings
b349b8797 test that format-assertions are valid with non-string types
8e5b2f10d fix needless inconsistencies in format tests between drafts
02d7cb59a Correct "ref with sibling id" tests
1649470ba More ipv6 tests to increase coverage
7334b4c7e Merge pull request #505 from ChALkeR/chalker/fix-unicode
0fb2d2787 Consolidate optional/unicode into optional/ecmascript-regex
4f8c6d7bf unevaluatedProperties: deep dynamic + refs
9103f3b6f $ref wit id does not test what it is indented to do
f300dd15f Add test "same $anchor with different base uri"
d128f9d7f Add test to check that $id resolved against nearest parent, not just immediate parent
72e31dd20 Merge pull request #515 from json-schema-org/ether/fix-mandatory-format-tests
0173a0835 Revert "by default, "format" only annotates, not validates"
66e813a90 Merge pull request #506 from json-schema-org/ether/formats-non-ascii
9430972bc fix unicode tests in accordance to pattern/patternProperties spec
git-subtree-dir: json
git-subtree-split: 54440eab4d50b80a62cc9f9c561e306cdbb19591
Diffstat (limited to 'tests/draft-future/optional/format/ipv6.json')
-rw-r--r-- | tests/draft-future/optional/format/ipv6.json | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/tests/draft-future/optional/format/ipv6.json b/tests/draft-future/optional/format/ipv6.json index cf629c6..6379927 100644 --- a/tests/draft-future/optional/format/ipv6.json +++ b/tests/draft-future/optional/format/ipv6.json @@ -1,9 +1,39 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, + { "description": "a valid IPv6 address", "data": "::1", "valid": true @@ -14,6 +44,16 @@ "valid": false }, { + "description": "trailing 4 hex symbols is valid", + "data": "::abef", + "valid": true + }, + { + "description": "trailing 5 hex symbols is invalid", + "data": "::abcef", + "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 @@ -54,6 +94,11 @@ "valid": false }, { + "description": "single set of double colons in the middle is valid", + "data": "1:d6::42", + "valid": true + }, + { "description": "two sets of double colons is invalid", "data": "1::d6::42", "valid": false |