ECC-1898: Add more tests

This commit is contained in:
shahramn 2024-10-28 15:36:35 +00:00
parent 34d49445c7
commit 6180c42ef6
2 changed files with 16 additions and 8 deletions

View File

@ -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

View File

@ -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