Skip to content

Commit

Permalink
Testing: Bit access
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Mar 6, 2024
1 parent 2aba61b commit fbd27b0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/grib_filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,20 @@ EOF
${tools_dir}/grib_filter $tempFilt $ECCODES_SAMPLES_PATH/GRIB2.tmpl > $tempOut
grep -q "No args: false" $tempOut

# Bit on off
cat >$tempFilt <<EOF
transient xx1 = 7 bit 0; print "xx1=[xx1]";
transient xx2 = 7 notbit 0; print "xx2=[xx2]";
transient yy1 = 6 bit 0; print "yy1=[yy1]";
transient yy2 = 6 notbit 0; print "yy2=[yy2]";
EOF
${tools_dir}/grib_filter $tempFilt $ECCODES_SAMPLES_PATH/GRIB2.tmpl > $tempOut
cat $tempOut
grep -q "xx1=1" $tempOut
grep -q "xx2=0" $tempOut
grep -q "yy1=0" $tempOut
grep -q "yy2=1" $tempOut


# Use of dummy expression (=true)
cat >$tempFilt <<EOF
Expand Down

0 comments on commit fbd27b0

Please sign in to comment.