mirror of https://github.com/ecmwf/eccodes.git
Testing: Use of the 'length' expression
This commit is contained in:
parent
56d6a410b2
commit
348c750c21
|
@ -362,6 +362,14 @@ set -e
|
||||||
[ $status -ne 0 ]
|
[ $status -ne 0 ]
|
||||||
grep "Assertion failure" $tempOut
|
grep "Assertion failure" $tempOut
|
||||||
|
|
||||||
|
# Use of the "length" expression
|
||||||
|
cat >$tempFilt <<EOF
|
||||||
|
assert( length(identifier) == 4 );
|
||||||
|
if (length(edition) == referenceValue) { print "matched"; }
|
||||||
|
EOF
|
||||||
|
${tools_dir}/grib_filter $tempFilt $ECCODES_SAMPLES_PATH/GRIB2.tmpl #> $tempOut
|
||||||
|
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -f $tempGrib $tempFilt $tempOut $tempRef
|
rm -f $tempGrib $tempFilt $tempOut $tempRef
|
||||||
rm -f ${data_dir}/formatint.rules ${data_dir}/binop.rules
|
rm -f ${data_dir}/formatint.rules ${data_dir}/binop.rules
|
||||||
|
|
Loading…
Reference in New Issue