From 739188aba583e05cf6a24bf62b6cb2b44829c855 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 17 Dec 2021 17:17:08 +0000 Subject: [PATCH] ECC-1322: Added test --- tests/CMakeLists.txt | 1 + tests/grib_ecc-1322.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 tests/grib_ecc-1322.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 38e0c27cd..9d6d4376e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -92,6 +92,7 @@ if( HAVE_BUILD_TOOLS ) grib_ecc-1261 grib_ecc-1271 grib_ecc-1315 + grib_ecc-1322 grib_ecc-1319 bufr_ecc-1028 bufr_ecc-1195 diff --git a/tests/grib_ecc-1322.sh b/tests/grib_ecc-1322.sh new file mode 100755 index 000000000..ebe66da02 --- /dev/null +++ b/tests/grib_ecc-1322.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# (C) Copyright 2005- ECMWF. +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. +# +# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by +# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. +# + +. ./include.sh +set -u +REDIRECT=/dev/null +label="grib_ecc-1322_test" + +tempGrb=temp.$label.grib +tempOut=temp.$label.out +tempRef=temp.$label.ref + +sample_grib1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl + +${tools_dir}/grib_set -s edition=2 $sample_grib1 $tempGrb +${tools_dir}/grib_compare -e -b param $sample_grib1 $tempGrb > $tempOut 2>&1 + +[ ! -s "$tempOut" ] + +# Clean up +rm -f $tempGrb $tempOut $tempRef