Danny Robson
94640d00f0
Schemas can insert default values, so we need to be able to test the resultant files.
25 lines
603 B
Bash
Executable File
25 lines
603 B
Bash
Executable File
#!/bin/bash
|
|
|
|
tool="/home/danny/src/lobo/build/debug/gcc/cruft/util/json-schema"
|
|
src="/home/danny/src/lobo/cruft/util/test/json/schema"
|
|
|
|
for base in $(ls "${src}"); do
|
|
[ -d ${base} ] || continue
|
|
|
|
echo "testing ${base}"
|
|
|
|
schema="${base}/schema.json"
|
|
|
|
for good in $(ls "${base}/good/"*.input.json); do
|
|
[ -f "${good}" ] || continue
|
|
|
|
expected="${good%.input.json}.result.json"
|
|
echo "${tool} ${schema} ${good} ${expected}"
|
|
done
|
|
|
|
for bad in $(ls "${base}/bad/"*.json); do
|
|
[ -f "${bad}" ] || continue
|
|
|
|
echo "${tool} ${schema} ${bad}"
|
|
done
|
|
done |