toml/test2/run.sh
2019-10-08 16:58:18 -07:00

31 lines
516 B
Bash

#
# POSITIVE tests
#
for i in toml-spec-tests/values/*.toml; do
echo -n $i ' '
../toml_json $i >& $i.json.out
rc=$?
[ -f $i.json ] && diff=$(diff $i.json $i.json.out) || diff=''
if [ "$rc" != "0" ] || [ "$diff" != "" ]; then
echo '[FAILED]'
else
echo '[OK]'
fi
done
#
# NEGATIVE tests
#
for i in toml-spec-tests/errors/*.toml; do
echo -n $i ' '
../toml_json $i >& $i.json.out
rc=$?
if [ "$rc" != "0" ]; then
echo '[OK]'
else
echo '[FAILED]'
fi
done