xref: /freebsd/contrib/libucl/tests/schema.test (revision a90b9d0159070121c221b966469c3e36d912bf82)
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