mirror of https://github.com/ecmwf/eccodes.git
ECC-1283: Add test
This commit is contained in:
parent
04ab71311e
commit
61b846b876
|
@ -199,6 +199,39 @@ EOF
|
||||||
# The relative differences are around 3.5e-5. Suppress all instances
|
# The relative differences are around 3.5e-5. Suppress all instances
|
||||||
${tools_dir}/bufr_compare -R airTemperature=4e-5 $f $fBufrTmp
|
${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 <<EOF
|
||||||
|
set numberOfSubsets = 3;
|
||||||
|
set compressedData = 1;
|
||||||
|
set unexpandedDescriptors = { 1015 };
|
||||||
|
set stationOrSiteName = { "Black", "Rose", "Immortal" };
|
||||||
|
set pack=1;
|
||||||
|
write;
|
||||||
|
EOF
|
||||||
|
${tools_dir}/codes_bufr_filter -o $fBufrTmp2 - $sample <<EOF
|
||||||
|
set numberOfSubsets = 3;
|
||||||
|
set compressedData = 1;
|
||||||
|
set unexpandedDescriptors = { 1015 };
|
||||||
|
set stationOrSiteName = { "Black", "Rose", "Mortal" };
|
||||||
|
set pack=1;
|
||||||
|
write;
|
||||||
|
EOF
|
||||||
|
set +e
|
||||||
|
${tools_dir}/bufr_compare $fBufrTmp1 $fBufrTmp2 >$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
|
# Clean up
|
||||||
# -------------
|
# -------------
|
||||||
|
|
Loading…
Reference in New Issue