#!/bin/sh

USAGE="Usage: compare\n\
       !! verify \$SWI_ORACLE_EMULATOR"

if test $# != 0
then
  /usr/5bin/echo $USAGE
  exit
fi

grep '^[^	#*]' test_data |\
sed "1 i\\
  ensure_loaded('$SWI_ORACLE_EMULATOR/oracle').\\
  sql." |\
$SWI_PROLOG 1>test_data.out

sed -e 's/[ ]//g'\
    -e '/^$/d'         test_data.out > tmp.out
sed -e 's/[ ]//g'\
    -e '/^$/d'         test_data.ref > tmp.ref

diff tmp.out tmp.ref

rm tmp.out tmp.ref

exit 0

