From 464ee10d76a6c59ff61bd5de43a6cc94d65264df Mon Sep 17 00:00:00 2001 From: shahramn Date: Wed, 9 Oct 2024 21:47:07 +0100 Subject: [PATCH] Testing: grib_dump error conditions --- tests/grib_dump.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/grib_dump.sh b/tests/grib_dump.sh index dca701ff2..fe4a2a251 100755 --- a/tests/grib_dump.sh +++ b/tests/grib_dump.sh @@ -169,6 +169,13 @@ file=$data_dir/sample.grib2 ${tools_dir}/grib_dump -p nonexist $file > $temp 2>&1 grep -q "Key/value not found" $temp +# Invalid options +set +e +${tools_dir}/grib_dump -jOD $file > $temp 2>&1 +status=$? +set -e +[ $status -ne 0 ] + # Unreadable message #-----------------------------------------------------------