Cat.test.in 756 Bytes
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
#! @BASH@
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2
3
4
5
6
echo 1..1 # Number of tests to be executed.
#
test -n "$CDO"      || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
7
8
CDOOUT=cout$$
CDOERR=cerr$$
Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FORMAT="-f srv -b 32"
RSTAT=0
#
IFILE=$DATAPATH/t21_geosp_tsurf.grb
#
RFILE=catdata_ref
OFILE=catdata
#
cp $IFILE ${RFILE}
chmod u+w ${RFILE}
cat $IFILE >> ${RFILE}
#
rm -f ${OFILE}
#
CDOTEST="cat"
CDOCOMMAND="$CDO cat $IFILE ${OFILE}"
#
$CDOCOMMAND
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
test $? -eq 0 || let RSTAT+=1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
$CDOCOMMAND
Uwe Schulzweida's avatar
Uwe Schulzweida committed
29
test $? -eq 0 || let RSTAT+=1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
30
31
#
$CDO diff $OFILE $RFILE > $CDOOUT 2> $CDOERR
Uwe Schulzweida's avatar
Uwe Schulzweida committed
32
33
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
34
35
36
37
38
39
40
41
42
43
cat $CDOOUT $CDOERR
#
test $RSTAT -eq 0 && echo "ok 1 - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok 1 - $CDOTEST"
#
rm -f $OFILE $RFILE
#
rm -f $CDOOUT $CDOERR
#
exit 0