GRIB message validity checker: Tests

This commit is contained in:
shahramn 2024-12-16 14:54:42 +00:00
parent 541d3800a8
commit dee96d9cce
1 changed files with 4 additions and 1 deletions

View File

@ -20,8 +20,11 @@ grib_check_key_equals $sample isMessageValid 1
# Check reduced Gaussian grid Ni # Check reduced Gaussian grid Ni
# ------------------------------ # ------------------------------
cat >$tempFilt<<EOF cat >$tempFilt<<EOF
set Ni = 0; set Ni = 0; # illegal
assert ( isMessageValid == 0 ); assert ( isMessageValid == 0 );
set Ni = MISSING;
assert ( isMessageValid == 1 );
set Ni = 0; # illegal again
write; write;
EOF EOF
${tools_dir}/grib_filter -o $tempGrib $tempFilt $sample 2>$tempText ${tools_dir}/grib_filter -o $tempGrib $tempFilt $sample 2>$tempText