diff --git a/tests/grib_grid_mercator.sh b/tests/grib_grid_mercator.sh index 825262b29..2be01a3fb 100755 --- a/tests/grib_grid_mercator.sh +++ b/tests/grib_grid_mercator.sh @@ -32,11 +32,30 @@ cat > $tempFilt < $tempOut # Nearest function ${tools_dir}/grib_ls -l 19,-97,1 $input > $tempOut grep -q "Point chosen #1 index=618" $tempOut +# Error conditions +# ---------------- +input=${data_dir}/mercator.grib2 +set +e +${tools_dir}/grib_get_data -s latitudeOfFirstGridPointInDegrees=90 $input > $tempOut 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "Transformation cannot be computed at the poles" $tempOut + +input=${data_dir}/mercator.grib2 +set +e +${tools_dir}/grib_get_data -s Ni=1 $input > $tempOut 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "Wrong number of points" $tempOut + + # Clean up rm -f $tempFilt $tempOut