From 6180c42ef6a52a0b6f87b28f52e86742ee39508d Mon Sep 17 00:00:00 2001 From: shahramn Date: Mon, 28 Oct 2024 15:36:35 +0000 Subject: [PATCH] ECC-1898: Add more tests --- tests/grib_ecc-1898.sh | 13 +++++-------- tests/grib_uerra.sh | 11 +++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/grib_ecc-1898.sh b/tests/grib_ecc-1898.sh index 0c6aaf44f..6718dc868 100755 --- a/tests/grib_ecc-1898.sh +++ b/tests/grib_ecc-1898.sh @@ -28,14 +28,11 @@ grep -q '288-288 g2level level = 1000 \[vertical.level\]' $tempOut $tools_dir/grib_dump -p levelist -Da $tempGrib 2> $tempOut grep -q 'levelist: Key/value not found' $tempOut -set +e -$tools_dir/grib_get -p levelist $tempGrib 2> $tempOut -set -e -grep -q 'levelist (Key/value not found)' $tempOut +result=$($tools_dir/grib_get -fp levelist $tempGrib) +[ "$result" = "not_found" ] -set +e -$tools_dir/grib_get -p mars.levelist $tempGrib 2> $tempOut -set -e -grep -q 'mars.levelist (Key/value not found)' $tempOut +result=$($tools_dir/grib_get -fp mars.levelist $tempGrib) +[ "$result" = "not_found" ] +# Clean up rm -f $tempGrib $tempOut diff --git a/tests/grib_uerra.sh b/tests/grib_uerra.sh index 9b6ec7bd3..0c4c5a8da 100755 --- a/tests/grib_uerra.sh +++ b/tests/grib_uerra.sh @@ -98,5 +98,16 @@ $grib2_sample $temp1 grib_check_key_equals $temp1 'marsExpver,mars.expver' '0078 0078' +# Stream 'dame' +${tools_dir}/grib_set -s productionStatusOfProcessedData=10 $grib2_sample $temp1 +grib_check_key_equals $temp1 'mars.time,mars.step' '1200 0' + +${tools_dir}/grib_set -s \ + productionStatusOfProcessedData=10,productDefinitionTemplateNumber=8,outerLoopTypeOfTimeIncrement=1,outerLoopLengthOfTimeRange=21 \ + $grib2_sample $temp1 +grib_check_key_equals $temp1 'mars.stream' 'dame' +result=$(${tools_dir}/grib_get -fp mars.time,mars.step $temp1) +[ "$result" = "not_found not_found" ] + # Clean up rm -f $temp1 $temp2 $tempSample