From 61b846b876d3468fcdb7d8e892c22f0be6842c2d Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 29 Sep 2021 18:29:01 +0100 Subject: [PATCH] ECC-1283: Add test --- tests/bufr_compare.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/bufr_compare.sh b/tests/bufr_compare.sh index 209ba775a..7b5d7b951 100755 --- a/tests/bufr_compare.sh +++ b/tests/bufr_compare.sh @@ -199,6 +199,39 @@ EOF # The relative differences are around 3.5e-5. Suppress all instances ${tools_dir}/bufr_compare -R airTemperature=4e-5 $f $fBufrTmp +#-------------------------------------------------------------------- +# ECC-1283: string arrays +#-------------------------------------------------------------------- +sample=$ECCODES_SAMPLES_PATH/BUFR4.tmpl +fBufrTmp1=temp1.${label}".bufr" +fBufrTmp2=temp2.${label}".bufr" + +${tools_dir}/codes_bufr_filter -o $fBufrTmp1 - $sample <$fLog +status=$? +set -e +[ $status -eq 1 ] +grep -q "string \[stationOrSiteName\] 1 out of 3 different" $fLog + +${tools_dir}/bufr_compare -b stationOrSiteName $fBufrTmp1 $fBufrTmp2 +rm -f $fBufrTmp1 $fBufrTmp2 + # Clean up # -------------