From cee5199b1e2056a6fb9f251e054555ae938a9a17 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 6 Dec 2019 13:31:28 +0000 Subject: [PATCH] SUP-2982: updated test --- tests/bufr_ecc-379.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/bufr_ecc-379.sh b/tests/bufr_ecc-379.sh index a7d2b635d..4bfd5392f 100755 --- a/tests/bufr_ecc-379.sh +++ b/tests/bufr_ecc-379.sh @@ -36,13 +36,16 @@ EOF # Expect this to fail as two values are out-of-range set +e -${tools_dir}/codes_bufr_filter -o $tempOut $tempRules $BufrFile 2>/dev/null +${tools_dir}/codes_bufr_filter -o $tempOut $tempRules $BufrFile 2>$tempText status=$? set -e [ $status -ne 0 ] +grep -q 'longitude. Maximum value (value\[0\]=500) out of range' $tempText + # Now set environment variable to turn out-of-range values into 'missing' export ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE=1 -${tools_dir}/codes_bufr_filter -o $tempOut $tempRules $BufrFile +${tools_dir}/codes_bufr_filter -o $tempOut $tempRules $BufrFile 2>$tempText +grep -q 'WARNING.*Setting it to missing value' $tempText unset ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE #echo 'set unpack=1;print "[longitude]";' | ${tools_dir}/bufr_filter - $BufrFile