Commit 22340799 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added Comp.test.in Compc.test.in.

parent a8fde6ff
#! @SHELL@
echo 1..6 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
STATS="eq ne le lt ge gt"
CONST=300
#
IFILE=$DATAPATH/comptest.srv
NTEST=1
CFILE=constdata
$CDO $FORMAT const,${CONST},${IFILE} $CFILE
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/comp_${STAT}c_ref
OFILE=comp_${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT} $IFILE $CFILE $OFILE"
echo "Running test: $NTEST - $CDOTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
rm -f $CDOOUT $CDOERR $CFILE
#
exit 0
#! @SHELL@
echo 1..6 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout$$
CDOERR=cerr$$
FORMAT="-f srv -b 32"
STATS="eqc nec lec ltc gec gtc"
CONST=300
#
IFILE=$DATAPATH/comptest.srv
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/comp_${STAT}_ref
OFILE=comp_${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT},${CONST} $IFILE $OFILE"
echo "Running test: $NTEST - $CDOTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
rm -f $OFILE
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment