From 20379383e4f29376f3209ab9d89751c1efbc8b9e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sun, 18 Jun 2023 18:39:28 +0100 Subject: [PATCH] Testing: Add test to cover base-class pack_string call --- tests/grib_change_scanning.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/grib_change_scanning.sh b/tests/grib_change_scanning.sh index 1f2f5ab29..2312c1ca3 100755 --- a/tests/grib_change_scanning.sh +++ b/tests/grib_change_scanning.sh @@ -128,6 +128,11 @@ grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB1.tmpl" jScansNegatively,jScans grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" iScansNegatively,iScansPositively '0 1' grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" jScansNegatively,jScansPositively '1 0' +# Rare case of pack_string for an integer key +${tools_dir}/grib_set -s swapScanningX:s=1 $ECCODES_SAMPLES_PATH/GRIB2.tmpl $tempGribA 2>/dev/null +${tools_dir}/grib_set -s swapScanningX:i=1 $ECCODES_SAMPLES_PATH/GRIB2.tmpl $tempGribB 2>/dev/null +cmp $tempGribA $tempGribB + # Clean up rm -f $tempFilt $tempGribA $tempGribB $tempRef $tempText rm -f ${data_dir}/scan1.grib ${data_dir}/scan.grib