diff options
author | bapt <bapt@FreeBSD.org> | 2014-03-22 17:28:14 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-03-22 17:28:14 +0000 |
commit | b471b8e16d6f2c205ae497402bad0a60c9cd6fa8 (patch) | |
tree | aabc973b2e4479277f8fe9aa0e8ed539826fdca3 /contrib/libucl/tests/schema/pattern.json | |
parent | 841158cbfbfc6b699dbc10892c6cb878a66a5d7e (diff) | |
parent | 6b4d859b54b28a9d46c317ff21676aa37241f6de (diff) | |
download | FreeBSD-src-b471b8e16d6f2c205ae497402bad0a60c9cd6fa8.zip FreeBSD-src-b471b8e16d6f2c205ae497402bad0a60c9cd6fa8.tar.gz |
Update to 20140321
This brings schema validation
MFC after: 1 week
Diffstat (limited to 'contrib/libucl/tests/schema/pattern.json')
-rw-r--r-- | contrib/libucl/tests/schema/pattern.json | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/libucl/tests/schema/pattern.json b/contrib/libucl/tests/schema/pattern.json new file mode 100644 index 0000000..befc4b5 --- /dev/null +++ b/contrib/libucl/tests/schema/pattern.json @@ -0,0 +1,23 @@ +[ + { + "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 + } + ] + } +] |