diff --git a/tests/grib_to_netcdf.sh b/tests/grib_to_netcdf.sh index c07dc89e9..f13d8475b 100755 --- a/tests/grib_to_netcdf.sh +++ b/tests/grib_to_netcdf.sh @@ -148,7 +148,9 @@ set -e [ $status -ne 0 ] grep -q "Wrong number of fields" $tempText -# Not regular grid + +echo "Not a regular grid ..." +# -------------------------- input=${data_dir}/reduced_gaussian_pressure_level.grib2 set +e ${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1 @@ -158,6 +160,17 @@ set -e grep -q "not on a regular lat/lon grid or on a regular Gaussian grid" $tempText +# ECC-1783: No error message when input file has invalid fields +input=$data_dir/bad.grib +set +e +${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "Wrong message length" $tempText + + +# Validity time check export GRIB_TO_NETCDF_CHECKVALIDTIME=0 ${tools_dir}/grib_to_netcdf -o $tempNetcdf $tempGrib [ -f "$tempNetcdf" ]