From 49c0aeb46144e08d734dbe11a6ea6be29b18b79e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 11 Nov 2024 11:23:22 +0000 Subject: [PATCH] Testing: Detect spaces in shortNames --- tests/grib_check_param_concepts.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/grib_check_param_concepts.sh b/tests/grib_check_param_concepts.sh index fd112b4d3..77f5ecc22 100755 --- a/tests/grib_check_param_concepts.sh +++ b/tests/grib_check_param_concepts.sh @@ -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