#!/bin/sh

BASEDIR="`dirname "${0}"`/.."
. "${BASEDIR}/functions"

TESTDDIR="${BASEDIR}/libucl"

TCONF="libucl_test.conf"
TOUT="${TCONF%.conf}.output"
${TOP_BUILDDIR}/libucl/libucl_test ${TESTDDIR}/${TCONF} > ${BASEDIR}/${TOUT}
report "running libucl_test"
${DIFF} ${BASEDIR}/${TOUT} ${TESTDDIR}/${TOUT}
report "checking ${TOUT}"

for i in 1 2 3 4 5 6 none "some nonsense"
do
  cfile="acct_rtcp_hep/broken${i}.conf"
  ${TOP_BUILDDIR}/libucl/libucl_test ${cfile}
  reportifnotfail "configuration validation"
done
