mirror of https://github.com/ecmwf/eccodes.git
Testing: grib_dump plain for flags
This commit is contained in:
parent
cda5be5877
commit
f688cce574
|
@ -219,6 +219,9 @@ static void dump_bits(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
int err = 0;
|
||||
int isDouble = 0;
|
||||
|
||||
if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0)
|
||||
return;
|
||||
|
||||
switch (a->get_native_type()) {
|
||||
case GRIB_TYPE_LONG:
|
||||
a->unpack_long(&lvalue, &size);
|
||||
|
@ -231,9 +234,6 @@ static void dump_bits(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
break;
|
||||
}
|
||||
|
||||
if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0)
|
||||
return;
|
||||
|
||||
print_offset(self->dumper.out, d, a);
|
||||
|
||||
if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) {
|
||||
|
|
|
@ -61,5 +61,10 @@ for s in $g2_samples; do
|
|||
grib_check_key_equals $sf "edition,packingType" "2 grid_ccsds"
|
||||
done
|
||||
|
||||
# Test dump_bits
|
||||
sample_polar="$ECCODES_SAMPLES_PATH/polar_stereographic_pl_grib2.tmpl"
|
||||
${tools_dir}/grib_dump $sample_polar > $temp
|
||||
grep -q "resolutionAndComponentFlags" $temp
|
||||
|
||||
# Clean up
|
||||
rm -f $temp
|
||||
|
|
Loading…
Reference in New Issue