2014-05-20 15:21:29 +10:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-05-26 17:34:23 +10:00
|
|
|
validate=@abs_top_builddir@/tools/json-validate
|
2014-05-20 15:21:29 +10:00
|
|
|
|
2014-05-26 17:34:23 +10:00
|
|
|
good=(@abs_top_srcdir@/test/json/good/*)
|
|
|
|
bad=(@abs_top_srcdir@/test/json/bad/*)
|
2014-05-20 15:21:29 +10:00
|
|
|
|
|
|
|
count=$((${#good[@]}+${#bad[@]}))
|
|
|
|
echo 1..$count
|
|
|
|
|
|
|
|
for i in ${good[@]};
|
|
|
|
do
|
|
|
|
$validate $i 2>/dev/null 1>&2
|
|
|
|
case $? in
|
|
|
|
0) echo "ok - $(basename $i .json)";;
|
|
|
|
*) echo "not ok - $(basename $i .json)";;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
for i in ${bad[@]};
|
|
|
|
do
|
|
|
|
$validate $i 1>&2 2>/dev/null
|
|
|
|
case $? in
|
|
|
|
0) echo "not ok - $(basename $i .json)";;
|
|
|
|
*) echo "ok - $(basename $i .json)";;
|
|
|
|
esac
|
|
|
|
done
|