BUFR decoding: Add test for presence of subsetNumber key

This commit is contained in:
Shahram Najm 2022-04-27 12:49:38 +01:00
parent 81c3b813ab
commit 5c9ec29487
1 changed files with 8 additions and 4 deletions

View File

@ -13,11 +13,7 @@
# Define a common label for all the tmp files # Define a common label for all the tmp files
label="bufr_dump_data_test" label="bufr_dump_data_test"
# Create log file
fLog=${label}".log" fLog=${label}".log"
rm -f $fLog
# Define tmp bufr files
fJsonTmp=${label}".json.tmp" fJsonTmp=${label}".json.tmp"
if [ $HAVE_MEMFS -eq 1 ]; then if [ $HAVE_MEMFS -eq 1 ]; then
@ -36,6 +32,14 @@ for file in ${bufr_files}; do
done done
# Check "subsetNumber" key is in the dump for uncompressed
# BUFRs with numberOfSubsets > 1
files='delayed_repl_01.bufr synop_multi_subset.bufr'
for f in $files; do
${tools_dir}/bufr_dump -p ${data_dir}/bufr/$f > $fLog
grep -q "^subsetNumber=[1-9]" $fLog
done
#============================================== #==============================================
# Testing output when ECCODES_DEBUG is enabled # Testing output when ECCODES_DEBUG is enabled
#============================================== #==============================================