#!/bin/sh

mkdir -p outputs

for x in ./inputs/*.input ; do
  FILE=$(basename ${x%.input})
  XMLOUT="outputs/${FILE}.output"
  PARSEOUT="outputs/${FILE}.parse"
  ./test-xmpp-connection $x ${PARSEOUT} ${XMLOUT} 
  if [ ! $? ] ; then
    echo "FAILED: $x - Test program had non-zero exit status" >&2
    continue
  fi
  xmldiff $x $XMLOUT
  if [ ! $? ] ; then
    echo "FAILED: $x - XML output doesn't match the input" >&2
    continue
  fi
  echo "SUCCESS: $x" >&2
done

#!/bin/sh

mkdir -p outputs

for x in ./inputs/*.input ; do
  FILE=$(basename ${x%.input})
  XMLOUT="outputs/${FILE}.output"
  PARSEOUT="outputs/${FILE}.parse"
  ./test-xmpp-connection $x ${PARSEOUT} ${XMLOUT} 
  if [ $? -ne 0 ] ; then
    echo "FAILED: $x - Test program had non-zero exit status" >&2
    continue
  fi
  xmldiff $x $XMLOUT
  if [ $? -ne 0 ] ; then
    echo "FAILED: $x - XML output doesn't match the input" >&2
    continue
  fi
  echo "SUCCESS: $x" >&2
done

Check for tests failure by comparing the exit code with 0
Check for tests failure by comparing the exit code with 0


20070118193420-93b9a-f64d3b681b2ce59f358cd6819f95244b3c60896c.gz
