diff options
Diffstat (limited to 'third_party/python/jsonschema/json/tests/draft2019-09/pattern.json')
-rw-r--r-- | third_party/python/jsonschema/json/tests/draft2019-09/pattern.json | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/third_party/python/jsonschema/json/tests/draft2019-09/pattern.json b/third_party/python/jsonschema/json/tests/draft2019-09/pattern.json new file mode 100644 index 0000000000..25e7299731 --- /dev/null +++ b/third_party/python/jsonschema/json/tests/draft2019-09/pattern.json @@ -0,0 +1,34 @@ +[ + { + "description": "pattern validation", + "schema": {"pattern": "^a*$"}, + "tests": [ + { + "description": "a matching pattern is valid", + "data": "aaa", + "valid": true + }, + { + "description": "a non-matching pattern is invalid", + "data": "abc", + "valid": false + }, + { + "description": "ignores non-strings", + "data": true, + "valid": true + } + ] + }, + { + "description": "pattern is not anchored", + "schema": {"pattern": "a+"}, + "tests": [ + { + "description": "matches a substring", + "data": "xxaayy", + "valid": true + } + ] + } +] |