aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Wasinger <j-wasinger@hotmail.com>2017-07-04 16:45:52 +0800
committerUbuntu <ubuntu@ip-172-31-32-43.us-west-2.compute.internal>2017-08-08 04:41:46 +0800
commit6e8afe6563febbf3f54ab0702aba7056eca762f0 (patch)
tree568f1db52846bf1cf5f64f6d480bdd377838c719
parent04350351733b1441a2b11502e674b16dd6c47659 (diff)
downloaddexon-tests-6e8afe6563febbf3f54ab0702aba7056eca762f0.tar.gz
dexon-tests-6e8afe6563febbf3f54ab0702aba7056eca762f0.tar.zst
dexon-tests-6e8afe6563febbf3f54ab0702aba7056eca762f0.zip
add "explanation" field. Reduce number of schema errors
-rwxr-xr-xGeneralStateTests/schema/run.sh1
-rwxr-xr-xJSONSchema/run.sh1
-rw-r--r--JSONSchema/schema.json (renamed from GeneralStateTests/schema/schema.json)3
-rwxr-xr-xJSONSchema/validate.js (renamed from GeneralStateTests/schema/validate.js)4
4 files changed, 7 insertions, 2 deletions
diff --git a/GeneralStateTests/schema/run.sh b/GeneralStateTests/schema/run.sh
deleted file mode 100755
index 45cfbf363..000000000
--- a/GeneralStateTests/schema/run.sh
+++ /dev/null
@@ -1 +0,0 @@
-echo -e "$(find .. -name '*.json' ! -path '../schema/*.json')" | node validate.js
diff --git a/JSONSchema/run.sh b/JSONSchema/run.sh
new file mode 100755
index 000000000..0624037bb
--- /dev/null
+++ b/JSONSchema/run.sh
@@ -0,0 +1 @@
+echo -e "$(find ../GeneralStateTests -name '*.json' ! -path '../schema/*.json')" | node validate.js
diff --git a/GeneralStateTests/schema/schema.json b/JSONSchema/schema.json
index 178b80b9b..1ca91c03d 100644
--- a/GeneralStateTests/schema/schema.json
+++ b/JSONSchema/schema.json
@@ -25,6 +25,9 @@
},
"additionalProperties": false
},
+ "explanation": {
+ "type": "string"
+ },
"env": {
"type": "object",
"properties": {
diff --git a/GeneralStateTests/schema/validate.js b/JSONSchema/validate.js
index af3e3b495..368d28da2 100755
--- a/GeneralStateTests/schema/validate.js
+++ b/JSONSchema/validate.js
@@ -38,7 +38,9 @@ rl.on('line', function(line){
if (x.errors.length > 0) {
console.log(line+':\n');
- console.log(x.errors+'\n')
+ for (var i = 0; i < x.errors.length; i++) {
+ console.log(' '+x.errors[i]+'\n')
+ }
}
} catch(e) {
console.log(e);