Skip to content

Commit

Permalink
Testing: Detect spaces in shortNames
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Nov 11, 2024
1 parent a2936dc commit 49c0aeb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/grib_check_param_concepts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ for paramIdFile in $paramIdFiles; do
fi
done


# -----------------------------------
echo "Check for bad shortNames"
# -----------------------------------
shortNameFile="$ECCODES_DEFINITION_PATH/grib2/shortName.def"
grep "^'.*=" $shortNameFile | sed -e 's/ = {//' > $tempText
set +e
grep ' ' $tempText # This grep should fail. No spaces must be found
status=$?
set -e
[ $status -ne 0 ]

# First check the GRIB2 paramId.def and shortName.def
# ----------------------------------------------------
$EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/grib2/paramId.def
Expand Down

0 comments on commit 49c0aeb

Please sign in to comment.