Testing: Use of the 'length' expression

This commit is contained in:
Shahram Najm 2023-09-03 13:30:21 +01:00
parent 56d6a410b2
commit 348c750c21
1 changed files with 8 additions and 0 deletions

View File

@ -362,6 +362,14 @@ set -e
[ $status -ne 0 ]
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
rm -f $tempGrib $tempFilt $tempOut $tempRef
rm -f ${data_dir}/formatint.rules ${data_dir}/binop.rules