Mercurial > hg > piper
annotate test.sh @ 64:4e9ea8f177b6 docrefactor
Pull out serialisedArray definition, add tests for both kinds
| author | Chris Cannam | 
|---|---|
| date | Wed, 05 Oct 2016 09:37:08 +0100 | 
| parents | a5eb5ef2e92d | 
| children | ada4cd9daaba | 
| rev | line source | 
|---|---|
| Chris@32 | 1 #!/bin/bash | 
| Chris@32 | 2 | 
| Chris@32 | 3 set -eu | 
| Chris@32 | 4 | 
| Chris@32 | 5 for ex in examples/*.json ; do | 
| Chris@32 | 6 echo "Checking $ex..." 1>&2 | 
| Chris@64 | 7 jsonschema -i "$ex" schema/$(basename "$ex" | sed 's/-[^.]*//') | 
| Chris@32 | 8 done | 
| Chris@32 | 9 | 
| Chris@40 | 10 for s in schema/*.json ; do | 
| Chris@40 | 11 if [ ! -f examples/$(basename "$s") ]; then | 
| Chris@64 | 12 if ! ls -1 examples/$(basename "$s" .json)-*.json >/dev/null 2>&1; then | 
| Chris@64 | 13 echo "WARNING: No example file for schema $s" | 
| Chris@64 | 14 fi | 
| Chris@40 | 15 fi | 
| Chris@40 | 16 done | 
| Chris@40 | 17 | 
