Danny Robson
b814c83e21
unit tests rely on AWKs record seperator being LF which presents issues when running windows tests. rather than modify the tap-driver provided by autotools (which would be extremely annoying to maintain) we run all tests through wine-crlf.sh which will perform line ending transforms as required. it's a pretty braindead script, so don't do anything terrifically extreme under it.
32 lines
681 B
Bash
Executable File
32 lines
681 B
Bash
Executable File
#!/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"
|