Testing: smart_table unpack_string

This commit is contained in:
shahramn 2024-02-24 21:57:46 +00:00
parent f5c4761861
commit 18edad5b52
2 changed files with 10 additions and 1 deletions

View File

@ -545,7 +545,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len)
if (*len < self->tableCodesSize) {
grib_context_log(a->context, GRIB_LOG_ERROR,
"Wrong size (%lu) for %s it contains %lu values", *len, a->name, self->tableCodesSize);
"Wrong size (%zu) for %s, it contains %zu values", *len, a->name, self->tableCodesSize);
*len = 0;
return GRIB_ARRAY_TOO_SMALL;
}

View File

@ -1290,6 +1290,15 @@ cat > $fRules <<EOF
EOF
${tools_dir}/codes_bufr_filter $fRules $f > $fLog
# smart table unpack_string
tempBufr=temp.$label.bufr
f="$ECCODES_SAMPLES_PATH/BUFR4.tmpl"
cat > $fRules <<EOF
set unexpandedDescriptors = { 1031 };
print "[expandedOriginalCodes:s]";
EOF
${tools_dir}/codes_bufr_filter -o $tempBufr $fRules $f
rm -f $tempBufr
# Clean up
rm -f ${f}.log ${f}.log.ref ${f}.out $fLog $fRules