From 3cc42eff1e92fdf4a9acf2768676b3ad421ff5cb Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 31 May 2022 16:47:00 +0100 Subject: [PATCH] Testing: Add tests for large constant fields (simple packing) --- tests/grib_change_packing.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/grib_change_packing.sh b/tests/grib_change_packing.sh index 5b5e27a54..958e66444 100755 --- a/tests/grib_change_packing.sh +++ b/tests/grib_change_packing.sh @@ -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