From d84441391b87397852f38d61bb4f90b55dc7868a Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 7 Nov 2023 14:17:00 +0000 Subject: [PATCH] Testing: gts_header accessor --- tests/gts_get.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/gts_get.sh b/tests/gts_get.sh index b61751dcf..0bea9b259 100755 --- a/tests/gts_get.sh +++ b/tests/gts_get.sh @@ -13,14 +13,11 @@ #Enter data dir cd ${data_dir}/gts -#Define a common label for all the tmp files label="gts_get_test" -#Create log file fLog=${label}".log" rm -f $fLog -#Define tmp file fTmp=${label}".tmp.txt" #---------------------------------------------- @@ -35,5 +32,20 @@ result=$( ${tools_dir}/grib_get -wcount=1 -p gts_CCCC -g $gts_file ) ${tools_dir}/grib_get -wcount=1 -p gts_header -g $gts_file +# Encoding should be disabled +# ----------------------------- +set +e +${tools_dir}/grib_set -s gts_CCCC=xxx -g $gts_file $fTmp +status=$? +set -e +[ $status -ne 0 ] -rm -f $fLog +set +e +${tools_dir}/grib_set -s gts_header=yyy -g $gts_file $fTmp +status=$? +set -e +[ $status -ne 0 ] + + +# Clean up +rm -f $fLog $fTmp