ECC-539: Add tests

This commit is contained in:
Shahram Najm 2021-01-25 15:44:30 +00:00
parent e1a2cbb13c
commit f8eb65e3be
2 changed files with 17 additions and 1 deletions

View File

@ -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`

View File

@ -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