diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-08-06 11:49:26 +0300 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-08-06 11:49:26 +0300 |
commit | 559aa6d73dea70e029c8e3dc33369548b19cb8eb (patch) | |
tree | 362b7c57cd44ee98426ca5ca8e56b0b09e2fb4a6 /json/tests | |
parent | 08898c4b64c3084229cf5c5463365a11128ada5b (diff) | |
parent | 7a5fd08611cb2fb07b8200860a4e352eb33ae7bf (diff) | |
download | jsonschema-559aa6d73dea70e029c8e3dc33369548b19cb8eb.tar.gz |
Merge commit '7a5fd08611cb2fb07b8200860a4e352eb33ae7bf'
* commit '7a5fd08611cb2fb07b8200860a4e352eb33ae7bf':
Squashed 'json/' changes from 2782d7c29..f82764080
Diffstat (limited to 'json/tests')
59 files changed, 141 insertions, 231 deletions
diff --git a/json/tests/draft-next/anchor.json b/json/tests/draft-next/anchor.json index f0fcf02..9744a3c 100644 --- a/json/tests/draft-next/anchor.json +++ b/json/tests/draft-next/anchor.json @@ -159,12 +159,12 @@ }, "tests": [ { - "description": "$ref should resolve to /$defs/A/allOf/1", + "description": "$ref resolves to /$defs/A/allOf/1", "data": "a", "valid": true }, { - "description": "$ref should not resolve to /$defs/A/allOf/0", + "description": "$ref does not resolve to /$defs/A/allOf/0", "data": 1, "valid": false } diff --git a/json/tests/draft-next/dynamicRef.json b/json/tests/draft-next/dynamicRef.json index d022856..79f04b5 100644 --- a/json/tests/draft-next/dynamicRef.json +++ b/json/tests/draft-next/dynamicRef.json @@ -374,7 +374,7 @@ ] }, { - "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.", + "description": "$ref and $dynamicAnchor are independent of order - $defs first", "schema": { "$id": "http://localhost:1234/strict-extendible-allof-defs-first.json", "allOf": [ @@ -424,7 +424,7 @@ ] }, { - "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.", + "description": "$ref and $dynamicAnchor are independent of order - $ref first", "schema": { "$id": "http://localhost:1234/strict-extendible-allof-ref-first.json", "allOf": [ diff --git a/json/tests/draft-next/items.json b/json/tests/draft-next/items.json index 1f0bdcf..01f20e6 100644 --- a/json/tests/draft-next/items.json +++ b/json/tests/draft-next/items.json @@ -214,7 +214,7 @@ ] }, { - "description": "items should not look in applicators, valid case", + "description": "items does not look in applicators, valid case", "schema": { "allOf": [ { "prefixItems": [ { "minimum": 3 } ] } @@ -223,12 +223,12 @@ }, "tests": [ { - "description": "prefixItems in allOf should not constrain items, invalid case", + "description": "prefixItems in allOf does not constrain items, invalid case", "data": [ 3, 5 ], "valid": false }, { - "description": "prefixItems in allOf should not constrain items, valid case", + "description": "prefixItems in allOf does not constrain items, valid case", "data": [ 5, 5 ], "valid": true } @@ -254,7 +254,7 @@ ] }, { - "description": "items should properly handle null data", + "description": "items with null", "schema": { "items": { "type": "null" @@ -262,7 +262,7 @@ }, "tests": [ { - "description": "null items allowed", + "description": "allows null elements", "data": [ null ], "valid": true } diff --git a/json/tests/draft-next/optional/bignum.json b/json/tests/draft-next/optional/bignum.json index 3f49226..94b4a4e 100644 --- a/json/tests/draft-next/optional/bignum.json +++ b/json/tests/draft-next/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -67,7 +67,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft-next/optional/ecmascript-regex.json b/json/tests/draft-next/optional/ecmascript-regex.json index 5bbfc45..9f79d42 100644 --- a/json/tests/draft-next/optional/ecmascript-regex.json +++ b/json/tests/draft-next/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -395,7 +395,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -480,7 +480,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -534,7 +534,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft-next/optional/format/date-time.json b/json/tests/draft-next/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft-next/optional/format/date-time.json +++ b/json/tests/draft-next/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft-next/optional/format/date.json b/json/tests/draft-next/optional/format/date.json index b4f61ee..06c9ea0 100644 --- a/json/tests/draft-next/optional/format/date.json +++ b/json/tests/draft-next/optional/format/date.json @@ -214,7 +214,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1963-06-1৪", "valid": false } diff --git a/json/tests/draft-next/optional/format/duration.json b/json/tests/draft-next/optional/format/duration.json index 741348a..a6acdc1 100644 --- a/json/tests/draft-next/optional/format/duration.json +++ b/json/tests/draft-next/optional/format/duration.json @@ -119,7 +119,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "P২Y", "valid": false } diff --git a/json/tests/draft-next/optional/format/ipv4.json b/json/tests/draft-next/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft-next/optional/format/ipv4.json +++ b/json/tests/draft-next/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft-next/optional/format/ipv6.json b/json/tests/draft-next/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft-next/optional/format/ipv6.json +++ b/json/tests/draft-next/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft-next/optional/format/time.json b/json/tests/draft-next/optional/format/time.json index 5011d78..3142587 100644 --- a/json/tests/draft-next/optional/format/time.json +++ b/json/tests/draft-next/optional/format/time.json @@ -189,7 +189,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২:00:00Z", "valid": false } diff --git a/json/tests/draft-next/prefixItems.json b/json/tests/draft-next/prefixItems.json index f72da11..8dc58ed 100644 --- a/json/tests/draft-next/prefixItems.json +++ b/json/tests/draft-next/prefixItems.json @@ -79,7 +79,7 @@ ] }, { - "description": "prefixItems should properly handle null data", + "description": "prefixItems properly handles null data", "schema": { "prefixItems": [ { diff --git a/json/tests/draft-next/ref.json b/json/tests/draft-next/ref.json index 05fea36..189eb41 100644 --- a/json/tests/draft-next/ref.json +++ b/json/tests/draft-next/ref.json @@ -567,12 +567,12 @@ }, "tests": [ { - "description": "number should pass", + "description": "number is valid", "data": 1, "valid": true }, { - "description": "non-number should fail", + "description": "non-number is invalid", "data": "a", "valid": false } diff --git a/json/tests/draft2019-09/anchor.json b/json/tests/draft2019-09/anchor.json index 4143d1f..7a9e32d 100644 --- a/json/tests/draft2019-09/anchor.json +++ b/json/tests/draft2019-09/anchor.json @@ -159,12 +159,12 @@ }, "tests": [ { - "description": "$ref should resolve to /$defs/A/allOf/1", + "description": "$ref resolves to /$defs/A/allOf/1", "data": "a", "valid": true }, { - "description": "$ref should not resolve to /$defs/A/allOf/0", + "description": "$ref does not resolve to /$defs/A/allOf/0", "data": 1, "valid": false } diff --git a/json/tests/draft2019-09/items.json b/json/tests/draft2019-09/items.json index 58992fc..c77ba0b 100644 --- a/json/tests/draft2019-09/items.json +++ b/json/tests/draft2019-09/items.json @@ -263,7 +263,7 @@ ] }, { - "description": "array-form items should properly handle null data", + "description": "array-form items with null instance elements", "schema": { "items": [ { @@ -273,7 +273,7 @@ }, "tests": [ { - "description": "null items allowed", + "description": "allows null elements", "data": [ null ], "valid": true } diff --git a/json/tests/draft2019-09/optional/bignum.json b/json/tests/draft2019-09/optional/bignum.json index 3f49226..94b4a4e 100644 --- a/json/tests/draft2019-09/optional/bignum.json +++ b/json/tests/draft2019-09/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -67,7 +67,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft2019-09/optional/ecmascript-regex.json b/json/tests/draft2019-09/optional/ecmascript-regex.json index 1beb0b3..764248f 100644 --- a/json/tests/draft2019-09/optional/ecmascript-regex.json +++ b/json/tests/draft2019-09/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -384,7 +384,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -469,7 +469,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -523,7 +523,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft2019-09/optional/format/date-time.json b/json/tests/draft2019-09/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft2019-09/optional/format/date-time.json +++ b/json/tests/draft2019-09/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft2019-09/optional/format/date.json b/json/tests/draft2019-09/optional/format/date.json index b4f61ee..06c9ea0 100644 --- a/json/tests/draft2019-09/optional/format/date.json +++ b/json/tests/draft2019-09/optional/format/date.json @@ -214,7 +214,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1963-06-1৪", "valid": false } diff --git a/json/tests/draft2019-09/optional/format/duration.json b/json/tests/draft2019-09/optional/format/duration.json index 741348a..a6acdc1 100644 --- a/json/tests/draft2019-09/optional/format/duration.json +++ b/json/tests/draft2019-09/optional/format/duration.json @@ -119,7 +119,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "P২Y", "valid": false } diff --git a/json/tests/draft2019-09/optional/format/ipv4.json b/json/tests/draft2019-09/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft2019-09/optional/format/ipv4.json +++ b/json/tests/draft2019-09/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft2019-09/optional/format/ipv6.json b/json/tests/draft2019-09/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft2019-09/optional/format/ipv6.json +++ b/json/tests/draft2019-09/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft2019-09/optional/format/time.json b/json/tests/draft2019-09/optional/format/time.json index 5011d78..3142587 100644 --- a/json/tests/draft2019-09/optional/format/time.json +++ b/json/tests/draft2019-09/optional/format/time.json @@ -189,7 +189,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২:00:00Z", "valid": false } diff --git a/json/tests/draft2019-09/ref.json b/json/tests/draft2019-09/ref.json index 32e3c66..6d1e90e 100644 --- a/json/tests/draft2019-09/ref.json +++ b/json/tests/draft2019-09/ref.json @@ -567,12 +567,12 @@ }, "tests": [ { - "description": "number should pass", + "description": "number is valid", "data": 1, "valid": true }, { - "description": "non-number should fail", + "description": "non-number is invalid", "data": "a", "valid": false } diff --git a/json/tests/draft2020-12/anchor.json b/json/tests/draft2020-12/anchor.json index 17e9080..8a6a5ea 100644 --- a/json/tests/draft2020-12/anchor.json +++ b/json/tests/draft2020-12/anchor.json @@ -159,12 +159,12 @@ }, "tests": [ { - "description": "$ref should resolve to /$defs/A/allOf/1", + "description": "$ref resolves to /$defs/A/allOf/1", "data": "a", "valid": true }, { - "description": "$ref should not resolve to /$defs/A/allOf/0", + "description": "$ref does not resolve to /$defs/A/allOf/0", "data": 1, "valid": false } diff --git a/json/tests/draft2020-12/dynamicRef.json b/json/tests/draft2020-12/dynamicRef.json index 618d836..3a51356 100644 --- a/json/tests/draft2020-12/dynamicRef.json +++ b/json/tests/draft2020-12/dynamicRef.json @@ -517,7 +517,7 @@ ] }, { - "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.", + "description": "$ref and $dynamicAnchor are independent of order - $defs first", "schema": { "$id": "http://localhost:1234/strict-extendible-allof-defs-first.json", "allOf": [ @@ -567,7 +567,7 @@ ] }, { - "description": "Tests for implementation dynamic anchor and reference link. Reference should be independent of any possible ordering.", + "description": "$ref and $dynamicAnchor are independent of order - $ref first", "schema": { "$id": "http://localhost:1234/strict-extendible-allof-ref-first.json", "allOf": [ diff --git a/json/tests/draft2020-12/items.json b/json/tests/draft2020-12/items.json index 1f0bdcf..38ab0e0 100644 --- a/json/tests/draft2020-12/items.json +++ b/json/tests/draft2020-12/items.json @@ -214,7 +214,7 @@ ] }, { - "description": "items should not look in applicators, valid case", + "description": "items does not look in applicators, valid case", "schema": { "allOf": [ { "prefixItems": [ { "minimum": 3 } ] } @@ -223,12 +223,12 @@ }, "tests": [ { - "description": "prefixItems in allOf should not constrain items, invalid case", + "description": "prefixItems in allOf does not constrain items, invalid case", "data": [ 3, 5 ], "valid": false }, { - "description": "prefixItems in allOf should not constrain items, valid case", + "description": "prefixItems in allOf does not constrain items, valid case", "data": [ 5, 5 ], "valid": true } @@ -254,7 +254,7 @@ ] }, { - "description": "items should properly handle null data", + "description": "items with null instance elements", "schema": { "items": { "type": "null" @@ -262,7 +262,7 @@ }, "tests": [ { - "description": "null items allowed", + "description": "allows null elements", "data": [ null ], "valid": true } diff --git a/json/tests/draft2020-12/optional/bignum.json b/json/tests/draft2020-12/optional/bignum.json index 3f49226..94b4a4e 100644 --- a/json/tests/draft2020-12/optional/bignum.json +++ b/json/tests/draft2020-12/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -67,7 +67,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft2020-12/optional/ecmascript-regex.json b/json/tests/draft2020-12/optional/ecmascript-regex.json index bb92acd..4d57efa 100644 --- a/json/tests/draft2020-12/optional/ecmascript-regex.json +++ b/json/tests/draft2020-12/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -395,7 +395,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -480,7 +480,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -534,7 +534,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft2020-12/optional/format/date-time.json b/json/tests/draft2020-12/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft2020-12/optional/format/date-time.json +++ b/json/tests/draft2020-12/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft2020-12/optional/format/date.json b/json/tests/draft2020-12/optional/format/date.json index b4f61ee..06c9ea0 100644 --- a/json/tests/draft2020-12/optional/format/date.json +++ b/json/tests/draft2020-12/optional/format/date.json @@ -214,7 +214,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1963-06-1৪", "valid": false } diff --git a/json/tests/draft2020-12/optional/format/duration.json b/json/tests/draft2020-12/optional/format/duration.json index 741348a..a6acdc1 100644 --- a/json/tests/draft2020-12/optional/format/duration.json +++ b/json/tests/draft2020-12/optional/format/duration.json @@ -119,7 +119,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "P২Y", "valid": false } diff --git a/json/tests/draft2020-12/optional/format/ipv4.json b/json/tests/draft2020-12/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft2020-12/optional/format/ipv4.json +++ b/json/tests/draft2020-12/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft2020-12/optional/format/ipv6.json b/json/tests/draft2020-12/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft2020-12/optional/format/ipv6.json +++ b/json/tests/draft2020-12/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft2020-12/optional/format/time.json b/json/tests/draft2020-12/optional/format/time.json index 5011d78..3142587 100644 --- a/json/tests/draft2020-12/optional/format/time.json +++ b/json/tests/draft2020-12/optional/format/time.json @@ -189,7 +189,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২:00:00Z", "valid": false } diff --git a/json/tests/draft2020-12/ref.json b/json/tests/draft2020-12/ref.json index bc8ac44..d630047 100644 --- a/json/tests/draft2020-12/ref.json +++ b/json/tests/draft2020-12/ref.json @@ -567,12 +567,12 @@ }, "tests": [ { - "description": "number should pass", + "description": "number is valid", "data": 1, "valid": true }, { - "description": "non-number should fail", + "description": "non-number is invalid", "data": "a", "valid": false } diff --git a/json/tests/draft3/optional/bignum.json b/json/tests/draft3/optional/bignum.json index ccc7c17..1bc8eb2 100644 --- a/json/tests/draft3/optional/bignum.json +++ b/json/tests/draft3/optional/bignum.json @@ -1,30 +1,13 @@ [ { "description": "integer", - "schema": {"type": "integer"}, + "schema": { "type": "integer" }, "tests": [ { "description": "a bignum is an integer", "data": 12345678910111213141516171819202122232425262728293031, "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "description": "a bignum is a number", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": true - } - ] - }, - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ + }, { "description": "a negative bignum is an integer", "data": -12345678910111213141516171819202122232425262728293031, @@ -34,9 +17,14 @@ }, { "description": "number", - "schema": {"type": "number"}, + "schema": { "type": "number" }, "tests": [ { + "description": "a bignum is a number", + "data": 98249283749234923498293171823948729348710298301928331, + "valid": true + }, + { "description": "a negative bignum is a number", "data": -98249283749234923498293171823948729348710298301928331, "valid": true @@ -45,7 +33,7 @@ }, { "description": "string", - "schema": {"type": "string"}, + "schema": { "type": "string" }, "tests": [ { "description": "a bignum is not a string", @@ -55,8 +43,8 @@ ] }, { - "description": "integer comparison", - "schema": {"maximum": 18446744073709551615}, + "description": "maximum integer comparison", + "schema": { "maximum": 18446744073709551615 }, "tests": [ { "description": "comparison works for high numbers", @@ -80,8 +68,8 @@ ] }, { - "description": "integer comparison", - "schema": {"minimum": -18446744073709551615}, + "description": "minimum integer comparison", + "schema": { "minimum": -18446744073709551615 }, "tests": [ { "description": "comparison works for very negative numbers", diff --git a/json/tests/draft4/anyOf.json b/json/tests/draft4/anyOf.json index f8d82e8..09cc3c2 100644 --- a/json/tests/draft4/anyOf.json +++ b/json/tests/draft4/anyOf.json @@ -152,31 +152,5 @@ "valid": false } ] - }, - { - "description": "nested anyOf, to check validation semantics", - "schema": { - "anyOf": [ - { - "anyOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] } ] diff --git a/json/tests/draft4/optional/bignum.json b/json/tests/draft4/optional/bignum.json index 7a622de..1bc8eb2 100644 --- a/json/tests/draft4/optional/bignum.json +++ b/json/tests/draft4/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -68,7 +68,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft4/optional/ecmascript-regex.json b/json/tests/draft4/optional/ecmascript-regex.json index 77624cf..9266c04 100644 --- a/json/tests/draft4/optional/ecmascript-regex.json +++ b/json/tests/draft4/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -384,7 +384,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -469,7 +469,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -523,7 +523,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft4/optional/format/date-time.json b/json/tests/draft4/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft4/optional/format/date-time.json +++ b/json/tests/draft4/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft4/optional/format/ipv4.json b/json/tests/draft4/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft4/optional/format/ipv4.json +++ b/json/tests/draft4/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft4/optional/format/ipv6.json b/json/tests/draft4/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft4/optional/format/ipv6.json +++ b/json/tests/draft4/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft4/ref.json b/json/tests/draft4/ref.json index d9978e9..b714fb0 100644 --- a/json/tests/draft4/ref.json +++ b/json/tests/draft4/ref.json @@ -493,12 +493,12 @@ }, "tests": [ { - "description": "number should pass", + "description": "number is valid", "data": 1, "valid": true }, { - "description": "non-number should fail", + "description": "non-number is invalid", "data": "a", "valid": false } diff --git a/json/tests/draft6/anyOf.json b/json/tests/draft6/anyOf.json index b720afa..ab5eb38 100644 --- a/json/tests/draft6/anyOf.json +++ b/json/tests/draft6/anyOf.json @@ -185,31 +185,5 @@ "valid": false } ] - }, - { - "description": "nested anyOf, to check validation semantics", - "schema": { - "anyOf": [ - { - "anyOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] } ] diff --git a/json/tests/draft6/optional/bignum.json b/json/tests/draft6/optional/bignum.json index 3f49226..94b4a4e 100644 --- a/json/tests/draft6/optional/bignum.json +++ b/json/tests/draft6/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -67,7 +67,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft6/optional/ecmascript-regex.json b/json/tests/draft6/optional/ecmascript-regex.json index 1beb0b3..764248f 100644 --- a/json/tests/draft6/optional/ecmascript-regex.json +++ b/json/tests/draft6/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -384,7 +384,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -469,7 +469,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -523,7 +523,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft6/optional/format/date-time.json b/json/tests/draft6/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft6/optional/format/date-time.json +++ b/json/tests/draft6/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft6/optional/format/ipv4.json b/json/tests/draft6/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft6/optional/format/ipv4.json +++ b/json/tests/draft6/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft6/optional/format/ipv6.json b/json/tests/draft6/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft6/optional/format/ipv6.json +++ b/json/tests/draft6/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft7/anyOf.json b/json/tests/draft7/anyOf.json index b720afa..ab5eb38 100644 --- a/json/tests/draft7/anyOf.json +++ b/json/tests/draft7/anyOf.json @@ -185,31 +185,5 @@ "valid": false } ] - }, - { - "description": "nested anyOf, to check validation semantics", - "schema": { - "anyOf": [ - { - "anyOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] } ] diff --git a/json/tests/draft7/optional/bignum.json b/json/tests/draft7/optional/bignum.json index 3f49226..94b4a4e 100644 --- a/json/tests/draft7/optional/bignum.json +++ b/json/tests/draft7/optional/bignum.json @@ -43,7 +43,7 @@ ] }, { - "description": "integer comparison", + "description": "maximum integer comparison", "schema": { "maximum": 18446744073709551615 }, "tests": [ { @@ -67,7 +67,7 @@ ] }, { - "description": "integer comparison", + "description": "minimum integer comparison", "schema": { "minimum": -18446744073709551615 }, "tests": [ { diff --git a/json/tests/draft7/optional/ecmascript-regex.json b/json/tests/draft7/optional/ecmascript-regex.json index 1beb0b3..764248f 100644 --- a/json/tests/draft7/optional/ecmascript-regex.json +++ b/json/tests/draft7/optional/ecmascript-regex.json @@ -7,12 +7,12 @@ }, "tests": [ { - "description": "matches in Python, but should not in jsonschema", + "description": "matches in Python, but not in ECMA 262", "data": "abc\\n", "valid": false }, { - "description": "should match", + "description": "matches", "data": "abc", "valid": true } @@ -342,7 +342,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "pattern with ASCII ranges", "schema": { "pattern": "[a-z]cole" }, "tests": [ { @@ -384,7 +384,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "pattern with non-ASCII digits", "schema": { "pattern": "^\\p{digit}+$" }, "tests": [ { @@ -469,7 +469,7 @@ ] }, { - "description": "unicode characters do not match ascii ranges", + "description": "patternProperties with ASCII ranges", "schema": { "type": "object", "patternProperties": { @@ -523,7 +523,7 @@ ] }, { - "description": "unicode digits are more than 0 through 9", + "description": "patternProperties with non-ASCII digits", "schema": { "type": "object", "patternProperties": { diff --git a/json/tests/draft7/optional/format/date-time.json b/json/tests/draft7/optional/format/date-time.json index f4f9933..0911273 100644 --- a/json/tests/draft7/optional/format/date-time.json +++ b/json/tests/draft7/optional/format/date-time.json @@ -119,12 +119,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected in the date portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false }, { - "description": "non-ascii digits should be rejected in the time portion", + "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false } diff --git a/json/tests/draft7/optional/format/date.json b/json/tests/draft7/optional/format/date.json index b4f61ee..06c9ea0 100644 --- a/json/tests/draft7/optional/format/date.json +++ b/json/tests/draft7/optional/format/date.json @@ -214,7 +214,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1963-06-1৪", "valid": false } diff --git a/json/tests/draft7/optional/format/ipv4.json b/json/tests/draft7/optional/format/ipv4.json index 6b166c7..4706581 100644 --- a/json/tests/draft7/optional/format/ipv4.json +++ b/json/tests/draft7/optional/format/ipv4.json @@ -64,7 +64,7 @@ "valid": false }, { - "description": "leading zeroes should be rejected, as they are treated as octals", + "description": "invalid leading zeroes, as they are treated as octals", "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", "data": "087.10.0.1", "valid": false @@ -75,7 +75,7 @@ "valid": true }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২7.0.0.1", "valid": false } diff --git a/json/tests/draft7/optional/format/ipv6.json b/json/tests/draft7/optional/format/ipv6.json index 6379927..94368f2 100644 --- a/json/tests/draft7/optional/format/ipv6.json +++ b/json/tests/draft7/optional/format/ipv6.json @@ -194,12 +194,12 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '৪' (a Bengali 4)", "data": "1:2:3:4:5:6:7:৪", "valid": false }, { - "description": "non-ascii digits should be rejected in the ipv4 portion also", + "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", "data": "1:2::192.16৪.0.1", "valid": false } diff --git a/json/tests/draft7/optional/format/time.json b/json/tests/draft7/optional/format/time.json index 5011d78..3142587 100644 --- a/json/tests/draft7/optional/format/time.json +++ b/json/tests/draft7/optional/format/time.json @@ -189,7 +189,7 @@ "valid": false }, { - "description": "non-ascii digits should be rejected", + "description": "invalid non-ASCII '২' (a Bengali 2)", "data": "1২:00:00Z", "valid": false } diff --git a/json/tests/draft7/ref.json b/json/tests/draft7/ref.json index 52e5168..dbf0595 100644 --- a/json/tests/draft7/ref.json +++ b/json/tests/draft7/ref.json @@ -634,12 +634,12 @@ }, "tests": [ { - "description": "number should pass", + "description": "number is valid", "data": 1, "valid": true }, { - "description": "non-number should fail", + "description": "non-number is invalid", "data": "a", "valid": false } |