Add tests for BUFR local key ident (in preparation for ECC-356)

This commit is contained in:
Shahram Najm 2018-10-30 11:38:36 +00:00
parent e38e893b9d
commit 4e7210803b
2 changed files with 27 additions and 2 deletions

View File

@ -72,5 +72,19 @@ result=`${tools_dir}/bufr_get -m aaen_55.bufr`
result=`${tools_dir}/bufr_get -m syno_1.bufr`
[ "$result" = "1 1 2012 10 30 0 0 0 7.45 151.83" ]
#Clean up
#-------------------------------------------
# Local ECMWF section: 'ident' key
#-------------------------------------------
result=`${tools_dir}/bufr_get -p isSatellite,ident syno_1.bufr`
[ "$result" = "0 91334 " ]
result=`${tools_dir}/bufr_get -p isSatellite,ident temp_102.bufr`
[ "$result" = "0 ASDE3 " ]
result=`${tools_dir}/bufr_get -p isSatellite,ident b004_145.bufr`
[ "$result" = "0 FAVRTLZA" ]
result=`${tools_dir}/bufr_get -f -p isSatellite,ident b003_56.bufr`
[ "$result" = "1 not_found" ]
# Clean up
rm -f $fLog $fTmp $res_get

View File

@ -140,7 +140,6 @@ ${tools_dir}/bufr_set -f -s bufrHeaderCentre=1024 -f $f $fBufrTmp 2>>$fLog 1>>$f
#-----------------------------------------------------------
# Test: key values out of range
#-----------------------------------------------------------
f=aaen_55.bufr
# The correction1 key is of type "bits" and only 6 bits wide
@ -160,6 +159,18 @@ if [ $? -eq 0 ]; then
fi
set -e
#-----------------------------------------------------------
# Test: Local ECMWF section. The 'ident' key
#-----------------------------------------------------------
f=temp_101.bufr
${tools_dir}/bufr_set -s ident=ABCD $f $fBufrTmp
result=`${tools_dir}/bufr_get -p ident $fBufrTmp`
[ "$result" = "ABCD" ]
${tools_dir}/bufr_set -s keyMore=ABCD $f $fBufrTmp
result=`${tools_dir}/bufr_get -p keyMore,ident $fBufrTmp`
[ "$result" = "ABCD ABCD" ]
# ${tools_dir}/bufr_compare $f $fBufrTmp
#Clean up
rm -f $fLog