mirror of https://github.com/ecmwf/eccodes.git
Testing: bufr_compare options
This commit is contained in:
parent
018a89d815
commit
6cf7a3f24f
|
@ -199,6 +199,26 @@ EOF
|
|||
# The relative differences are around 3.5e-5. Suppress all instances
|
||||
${tools_dir}/bufr_compare -R airTemperature=4e-5 $f $fBufrTmp
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# -d option
|
||||
#--------------------------------------------------------------------
|
||||
echo "Test: -d option" >> $fLog
|
||||
f='PraticaTemp.bufr'
|
||||
${tools_dir}/codes_bufr_filter -o $fBufrTmp - $f <<EOF
|
||||
set unpack=1;
|
||||
set #1#airTemperature=288.41;
|
||||
set pack=1;
|
||||
write;
|
||||
EOF
|
||||
set +e
|
||||
${tools_dir}/bufr_compare -d $f $fBufrTmp
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
[ -f "error1_1.bufr" ]
|
||||
[ -f "error2_1.bufr" ]
|
||||
rm -f error1_1.bufr error2_1.bufr
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# ECC-1283: string arrays
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
@ -53,4 +53,14 @@ do
|
|||
rm -f $fRules
|
||||
fi
|
||||
done
|
||||
|
||||
# Check expected failures
|
||||
set +e
|
||||
${tools_dir}/bufr_dump -Dfilter ${data_dir}/bufr/tropical_cyclone.bufr > $fLog 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
grep -q "Cannot dump filter for multi-message BUFR files" $fLog
|
||||
|
||||
# Clean up
|
||||
rm -f $fLog $fRules
|
||||
|
|
Loading…
Reference in New Issue