2021-06-08 11:50:09 +00:00
|
|
|
#!/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.
|
|
|
|
#
|
|
|
|
|
2022-04-03 22:02:48 +00:00
|
|
|
. ./include.ctest.sh
|
2021-06-08 11:50:09 +00:00
|
|
|
set -u
|
|
|
|
label="bufr_ecc-1028_test"
|
2024-02-20 13:57:38 +00:00
|
|
|
tempFilt=temp.$label.filt
|
2021-06-08 11:50:09 +00:00
|
|
|
tempError=temp.$label.err
|
|
|
|
|
|
|
|
sample_bufr4=$ECCODES_SAMPLES_PATH/BUFR4.tmpl
|
|
|
|
|
|
|
|
# Incorrect replication. Encoding should fail
|
2024-02-20 13:57:38 +00:00
|
|
|
echo "set unexpandedDescriptors={ 101000, 31002 }; write;" > $tempFilt
|
2021-06-08 11:50:09 +00:00
|
|
|
set +e
|
2024-02-20 13:57:38 +00:00
|
|
|
${tools_dir}/bufr_filter $tempFilt $sample_bufr4 2>$tempError
|
2021-06-08 11:50:09 +00:00
|
|
|
status=$?
|
|
|
|
set -e
|
|
|
|
[ $status -ne 0 ]
|
|
|
|
# Check error message
|
2024-11-14 12:16:14 +00:00
|
|
|
grep -q "Delayed replication: 101000: expected 1 but only found 0 element(s)" $tempError
|
2021-06-08 11:50:09 +00:00
|
|
|
|
|
|
|
|
2024-02-20 13:57:38 +00:00
|
|
|
rm -f $tempFilt $tempError
|