xref: /freebsd/contrib/libucl/tests/schema.test (revision 49dae58b287906be26f56ba3e3dc693c3ba8cf37)
1#!/bin/sh
2
3PROG=${TEST_BINARY_DIR}/test_schema
4rm /tmp/_ucl_test_schema.out ||true
5_succeed=0
6_tests=0
7for i in ${TEST_DIR}/schema/*.json ; do
8	_name=`basename $i`
9	printf "running schema test suite $_name... "
10	$PROG >> /tmp/_ucl_test_schema.out < $i
11	if [ $? -eq 0 ] ; then
12	    echo "OK"
13	    _succeed=$(($_succeed + 1))
14	else
15	    echo "Fail"
16	fi
17	_tests=$(($_tests + 1))
18done
19
20if [ $_tests -ne $_succeed ] ; then
21    exit 1
22fi
23