Testing: Decode key as other types

This commit is contained in:
Shahram Najm 2023-06-26 17:12:29 +01:00
parent 82003e8b41
commit c23156bdbe
1 changed files with 8 additions and 1 deletions

View File

@ -128,12 +128,19 @@ grib_check_key_equals $temp stepType avg
${tools_dir}/grib_set -s stepType=avg $grib2_sample $temp
grib_check_key_equals $temp typeOfTimeIncrement 3
# Decode stepRange as an int and double
# Decode/Encode stepRange as an int and double
${tools_dir}/grib_set -s stepType=accum,stepRange=23-28 $grib2_sample $temp
grib_check_key_equals $temp "stepRange:s" "23-28"
grib_check_key_equals $temp "stepRange:i" "28"
grib_check_key_equals $temp "stepRange:d" "28"
${tools_dir}/grib_set -s stepRange:i=24 $grib2_sample $temp
grib_check_key_equals $temp "stepRange,startStep,endStep" "24 24 24"
# Should this be an error? currently this gets cast from double to int
${tools_dir}/grib_set -s stepRange:d=14.56 $grib2_sample $temp
grib_check_key_equals $temp "stepRange,startStep,endStep" "14 14 14"
# Clean up
rm -f $temp
rm -f $grib2File.p8tmp ${grib2File}.tmp x.grib