Skip to content

Commit

Permalink
ECC-1898: Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Oct 28, 2024
1 parent 34d4944 commit 6180c42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/grib_ecc-1898.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions tests/grib_uerra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6180c42

Please sign in to comment.