updated test2/run.sh

This commit is contained in:
CK Tan 2019-10-10 04:15:45 -07:00
parent 987f4ef0d7
commit 2453664abb
1 changed files with 15 additions and 6 deletions

View File

@ -7,13 +7,22 @@ fi
# POSITIVE tests
#
for i in toml-spec-tests/values/*.toml; do
echo -n $i ' '
fname="$i"
ext="${fname##*.}"
fname="${fname%.*}"
echo -n $fname ' '
res='[OK]'
if (../toml_json $i >& $i.json.out); then
jq . $i.json.out > t.json
mv t.json $i.json.out
if [ -f $i.json ] && (diff $i.json $i.json.out >& /dev/null); then
if (../toml_json $fname.toml >& $fname.json.out); then
jq . $fname.json.out > t.json
mv t.json $fname.json.out
if [ -f $fname.json ]; then
if ! (diff $fname.json $fname.json.out >& /dev/null); then
res='[FAILED]'
else
rm -f $fname.json.out
fi
else
res='[??]'
fi
fi
echo $res