mirror of https://github.com/ecmwf/eccodes.git
ECC-539: Add tests
This commit is contained in:
parent
e1a2cbb13c
commit
f8eb65e3be
|
@ -44,7 +44,7 @@ r2=`${tools_dir}/grib_get -n ls $temp`
|
|||
[ "$r1" = "$r2" ]
|
||||
|
||||
|
||||
echo "Test: ECC-1086..."
|
||||
echo "Test: ECC-1086 invalid message ..."
|
||||
# -------------------------
|
||||
# This file is 179 bytes long. We chop the last byte to create
|
||||
# an invalid GRIB message (Final 7777 is 777)
|
||||
|
@ -80,6 +80,16 @@ set -e
|
|||
count=`${tools_dir}/grib_count $temp`
|
||||
[ $count -eq 43 ]
|
||||
|
||||
|
||||
echo "Test: ECC-539 input=output ..."
|
||||
# -----------------------
|
||||
set +e
|
||||
${tools_dir}/grib_copy $temp $temp
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
|
||||
#${tools_dir}/grib_copy -w count=1 -X 57143 $input $temp #Last msg
|
||||
#r1=`${tools_dir}/grib_get -w count=37 -n ls $input`
|
||||
#r2=`${tools_dir}/grib_get -n ls $temp`
|
||||
|
|
|
@ -72,5 +72,11 @@ done
|
|||
${tools_dir}/grib_set -s centre=289 $ECCODES_SAMPLES_PATH/GRIB2.tmpl $outfile
|
||||
${tools_dir}/grib_dump -O $outfile | grep -q 'centre = 289.*Zambia'
|
||||
|
||||
# ECC-539: avoid output being the same as input
|
||||
set +e
|
||||
${tools_dir}/grib_set -s centre=0 $outfile $outfile
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
rm -f $outfile
|
||||
|
|
Loading…
Reference in New Issue