libcruft-util/test/json-parse.sh.in

32 lines
681 B
Bash
Raw Normal View History

#!/bin/sh
validate=@abs_top_builddir@/tools/json-validate@EXEEXT@
count=0
code=0
for i in $(ls @abs_top_srcdir@/test/json/good/*);
do
@abs_top_srcdir@/build-aux/wine-crlf.sh $validate $i 2>/dev/null 1>&2
case $? in
0) echo "ok - good/$(basename $i .json)";;
*) echo "not ok - good/$(basename $i .json)"; code=1;;
esac
count=$((count+1))
done
for i in $(ls @abs_top_srcdir@/test/json/bad/*);
do
@abs_top_srcdir@/build-aux/wine-crlf.sh $validate $i 1>&2 2>/dev/null
case $? in
0) echo "not ok - bad/$(basename $i .json)"; code=1;;
*) echo "ok - bad/$(basename $i .json)";;
esac
count=$((count+1))
done
echo "1..$count"