Testing: Add tests for large constant fields (simple packing)

This commit is contained in:
Shahram Najm 2022-05-31 16:47:00 +01:00
parent 24b6bffee8
commit 3cc42eff1e
1 changed files with 15 additions and 0 deletions

View File

@ -127,5 +127,20 @@ if [ $HAVE_AEC -eq 0 ]; then
grep -q "CCSDS support not enabled. Please rebuild with -DENABLE_AEC=ON" $temp_err
fi
# Large constant fields
# -----------------------
input=${data_dir}/sample.grib2
ECCODES_GRIB_LARGE_CONSTANT_FIELDS=0 ${tools_dir}/grib_set -d1 $input $temp
grib_check_key_equals $temp const,bitsPerValue,section7Length '1 0 5'
ECCODES_GRIB_LARGE_CONSTANT_FIELDS=1 ${tools_dir}/grib_set -d1 $input $temp
grib_check_key_equals $temp const,bitsPerValue,section7Length '1 16 997'
${tools_dir}/grib_set -s produceLargeConstantFields=0 -d1 $input $temp
grib_check_key_equals $temp const,bitsPerValue,section7Length '1 0 5'
${tools_dir}/grib_set -s produceLargeConstantFields=1 -d1 $input $temp
grib_check_key_equals $temp const,bitsPerValue,section7Length '1 16 997'
rm -f $temp $temp_err