28 lines
549 B
Bash
Executable File
28 lines
549 B
Bash
Executable File
#!/bin/sh
|
|
|
|
validate=@abs_top_builddir@/tools/json-validate
|
|
|
|
good=(@abs_top_srcdir@/test/json/good/*)
|
|
bad=(@abs_top_srcdir@/test/json/bad/*)
|
|
|
|
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
|