1263646Sbapt#!/bin/sh 2263646Sbapt 3263646SbaptPROG=${TEST_BINARY_DIR}/test_basic 4263646Sbapt 5263646Sbaptfor _tin in ${TEST_DIR}/basic/*.in ; do 6263646Sbapt _t=`echo $_tin | sed -e 's/.in$//'` 7263646Sbapt _out=${TEST_OUT_DIR}/basic.out 8263646Sbapt $PROG $_t.in $_out 9263646Sbapt if [ $? -ne 0 ] ; then 10263646Sbapt echo "Test: $_t failed, output:" 11263646Sbapt cat $_out 12263646Sbapt rm $_out 13263646Sbapt exit 1 14263646Sbapt fi 15263646Sbapt if [ -f $_t.res ] ; then 16263646Sbapt diff -s $_out $_t.res -u 2>/dev/null 17263646Sbapt if [ $? -ne 0 ] ; then 18263646Sbapt rm $_out 19263646Sbapt echo "Test: $_t output missmatch" 20263646Sbapt exit 1 21263646Sbapt fi 22263646Sbapt fi 23263646Sbapt rm $_out 24298166Sbapt # Use FD interface 25298166Sbapt $PROG -f $_t.in > /dev/null 26298166Sbapt # JSON output 27298166Sbapt $PROG -j $_t.in > /dev/null 28298166Sbapt $PROG -c -j $_t.in > /dev/null 29298166Sbapt # YAML output 30298166Sbapt $PROG -y $_t.in > /dev/null 31298166Sbapt # Save comments mode 32298166Sbapt $PROG -C $_t.in > /dev/null 33298166Sbapt # Save macro mode 34298166Sbapt $PROG -M $_t.in > /dev/null 35298166Sbapt $PROG -M -C $_t.in > /dev/null 36263646Sbaptdone 37263646Sbapt 38263646Sbapt 39