summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2015-06-05 08:28:25 -0400
committerJulian Berman <Julian@GrayVines.com>2015-06-05 08:28:25 -0400
commit582246aabd3174e6da0887686c23fa0d54f8abbf (patch)
tree4e99eb8f1b9af39c0d8eb051e6fdb317e3a70135
parent168237288e2e6469f76ffeda5069053d294cb302 (diff)
parent7afa6f02eb14cbe2f5003f2836c4f16761857355 (diff)
downloadjsonschema-582246aabd3174e6da0887686c23fa0d54f8abbf.tar.gz
Merge commit '7afa6f02eb14cbe2f5003f2836c4f16761857355'
* commit '7afa6f02eb14cbe2f5003f2836c4f16761857355': Squashed 'json/' changes from 0b657e8..3481a79
-rw-r--r--json/README.md1
-rw-r--r--json/tests/draft3/optional/format.json5
-rw-r--r--json/tests/draft3/pattern.json11
-rw-r--r--json/tests/draft3/ref.json21
-rw-r--r--json/tests/draft4/optional/format.json5
-rw-r--r--json/tests/draft4/pattern.json11
-rw-r--r--json/tests/draft4/ref.json21
7 files changed, 69 insertions, 6 deletions
diff --git a/json/README.md b/json/README.md
index aa63a6c..355defd 100644
--- a/json/README.md
+++ b/json/README.md
@@ -99,6 +99,7 @@ This suite is being used by:
* [skeemas](https://github.com/Prestaul/skeemas)
* [tv4](https://github.com/geraintluff/tv4)
* [z-schema](https://github.com/zaggino/z-schema)
+* [jsen](https://github.com/bugventure/jsen)
### .NET ###
diff --git a/json/tests/draft3/optional/format.json b/json/tests/draft3/optional/format.json
index fc86b03..3ca7319 100644
--- a/json/tests/draft3/optional/format.json
+++ b/json/tests/draft3/optional/format.json
@@ -78,6 +78,11 @@
"valid": true
},
{
+ "description": "a valid protocol-relative URI",
+ "data": "//foo.bar/?baz=qux#quux",
+ "valid": true
+ },
+ {
"description": "an invalid URI",
"data": "\\\\WINDOWS\\fileshare",
"valid": false
diff --git a/json/tests/draft3/pattern.json b/json/tests/draft3/pattern.json
index befc4b5..25e7299 100644
--- a/json/tests/draft3/pattern.json
+++ b/json/tests/draft3/pattern.json
@@ -19,5 +19,16 @@
"valid": true
}
]
+ },
+ {
+ "description": "pattern is not anchored",
+ "schema": {"pattern": "a+"},
+ "tests": [
+ {
+ "description": "matches a substring",
+ "data": "xxaayy",
+ "valid": true
+ }
+ ]
}
]
diff --git a/json/tests/draft3/ref.json b/json/tests/draft3/ref.json
index c984019..903ecb6 100644
--- a/json/tests/draft3/ref.json
+++ b/json/tests/draft3/ref.json
@@ -86,19 +86,34 @@
},
"tests": [
{
- "description": "slash",
+ "description": "slash invalid",
"data": {"slash": "aoeu"},
"valid": false
},
{
- "description": "tilda",
+ "description": "tilda invalid",
"data": {"tilda": "aoeu"},
"valid": false
},
{
- "description": "percent",
+ "description": "percent invalid",
"data": {"percent": "aoeu"},
"valid": false
+ },
+ {
+ "description": "slash valid",
+ "data": {"slash": 123},
+ "valid": true
+ },
+ {
+ "description": "tilda valid",
+ "data": {"tilda": 123},
+ "valid": true
+ },
+ {
+ "description": "percent valid",
+ "data": {"percent": 123},
+ "valid": true
}
]
},
diff --git a/json/tests/draft4/optional/format.json b/json/tests/draft4/optional/format.json
index 53c5d25..aacfd11 100644
--- a/json/tests/draft4/optional/format.json
+++ b/json/tests/draft4/optional/format.json
@@ -30,6 +30,11 @@
"valid": true
},
{
+ "description": "a valid protocol-relative URI",
+ "data": "//foo.bar/?baz=qux#quux",
+ "valid": true
+ },
+ {
"description": "an invalid URI",
"data": "\\\\WINDOWS\\fileshare",
"valid": false
diff --git a/json/tests/draft4/pattern.json b/json/tests/draft4/pattern.json
index befc4b5..25e7299 100644
--- a/json/tests/draft4/pattern.json
+++ b/json/tests/draft4/pattern.json
@@ -19,5 +19,16 @@
"valid": true
}
]
+ },
+ {
+ "description": "pattern is not anchored",
+ "schema": {"pattern": "a+"},
+ "tests": [
+ {
+ "description": "matches a substring",
+ "data": "xxaayy",
+ "valid": true
+ }
+ ]
}
]
diff --git a/json/tests/draft4/ref.json b/json/tests/draft4/ref.json
index b38ff03..7e80552 100644
--- a/json/tests/draft4/ref.json
+++ b/json/tests/draft4/ref.json
@@ -86,19 +86,34 @@
},
"tests": [
{
- "description": "slash",
+ "description": "slash invalid",
"data": {"slash": "aoeu"},
"valid": false
},
{
- "description": "tilda",
+ "description": "tilda invalid",
"data": {"tilda": "aoeu"},
"valid": false
},
{
- "description": "percent",
+ "description": "percent invalid",
"data": {"percent": "aoeu"},
"valid": false
+ },
+ {
+ "description": "slash valid",
+ "data": {"slash": 123},
+ "valid": true
+ },
+ {
+ "description": "tilda valid",
+ "data": {"tilda": 123},
+ "valid": true
+ },
+ {
+ "description": "percent valid",
+ "data": {"percent": 123},
+ "valid": true
}
]
},