Files
deb-python-jsonschema/json/tests/draft4/pattern.json
Julian Berman 582246aabd Merge commit '7afa6f02eb14cbe2f5003f2836c4f16761857355'
* commit '7afa6f02eb14cbe2f5003f2836c4f16761857355':
  Squashed 'json/' changes from 0b657e8..3481a79
2015-06-05 08:28:25 -04:00

35 lines
857 B
JSON

[
{
"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
}
]
}
]