summaryrefslogtreecommitdiff
path: root/json/tests/draft4
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft4')
-rw-r--r--json/tests/draft4/enum.json10
-rw-r--r--json/tests/draft4/optional/ecmascript-regex.json11
-rw-r--r--json/tests/draft4/ref.json14
3 files changed, 18 insertions, 17 deletions
diff --git a/json/tests/draft4/enum.json b/json/tests/draft4/enum.json
index 6844578..f085097 100644
--- a/json/tests/draft4/enum.json
+++ b/json/tests/draft4/enum.json
@@ -33,6 +33,16 @@
"description": "objects are deep compared",
"data": {"foo": false},
"valid": false
+ },
+ {
+ "description": "valid object matches",
+ "data": {"foo": 12},
+ "valid": true
+ },
+ {
+ "description": "extra properties in object is invalid",
+ "data": {"foo": 12, "boo": 42},
+ "valid": false
}
]
},
diff --git a/json/tests/draft4/optional/ecmascript-regex.json b/json/tests/draft4/optional/ecmascript-regex.json
index b9412e0..6ed6cbe 100644
--- a/json/tests/draft4/optional/ecmascript-regex.json
+++ b/json/tests/draft4/optional/ecmascript-regex.json
@@ -1,16 +1,5 @@
[
{
- "description": "ECMA 262 regex non-compliance",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "ECMA 262 has no support for \\Z anchor from .NET",
- "data": "^\\S(|(.|\\n)*\\S)\\Z",
- "valid": false
- }
- ]
- },
- {
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
"type": "string",
diff --git a/json/tests/draft4/ref.json b/json/tests/draft4/ref.json
index fc3e94b..f88e963 100644
--- a/json/tests/draft4/ref.json
+++ b/json/tests/draft4/ref.json
@@ -75,13 +75,15 @@
{
"description": "escaped pointer ref",
"schema": {
- "tilde~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
+ "definitions": {
+ "tilde~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"}
+ },
"properties": {
- "tilde": {"$ref": "#/tilde~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
+ "tilde": {"$ref": "#/definitions/tilde~0field"},
+ "slash": {"$ref": "#/definitions/slash~1field"},
+ "percent": {"$ref": "#/definitions/percent%25field"}
}
},
"tests": [