From a8c84c249be78942613cc506d6181b6fec7e1f89 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 22 Dec 2023 19:46:57 +0000 Subject: [PATCH] ECC-1739: Test --- tests/bufr_set.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/bufr_set.sh b/tests/bufr_set.sh index b0f901d95..f8d78aba5 100755 --- a/tests/bufr_set.sh +++ b/tests/bufr_set.sh @@ -179,7 +179,8 @@ result=`${tools_dir}/bufr_get -p ident $fBufrTmp` #----------------------------------------------------------- # ECC-1359: string that can be converted to an integer # ---------------------------------------------------------- -${tools_dir}/bufr_set -s messageLength:s=333 $ECCODES_SAMPLES_PATH/BUFR4_local.tmpl $fBufrTmp +sample=$ECCODES_SAMPLES_PATH/BUFR4_local.tmpl +${tools_dir}/bufr_set -s messageLength:s=333 $sample $fBufrTmp result=`${tools_dir}/bufr_get -p messageLength $fBufrTmp` [ "$result" = "333" ] @@ -187,7 +188,8 @@ result=`${tools_dir}/bufr_get -p messageLength $fBufrTmp` #----------------------------------------------------------- # Invalid masterTablesVersionNumber #----------------------------------------------------------- -${tools_dir}/bufr_set -s masterTablesVersionNumber=255 $ECCODES_SAMPLES_PATH/BUFR4.tmpl $fBufrTmp +sample=$ECCODES_SAMPLES_PATH/BUFR4.tmpl +${tools_dir}/bufr_set -s masterTablesVersionNumber=255 $sample $fBufrTmp set +e ${tools_dir}/bufr_dump -p $fBufrTmp 2>>$fLog 1>>$fLog if [ $? -eq 0 ]; then @@ -198,6 +200,16 @@ set -e grep -q "unable to find definition file sequence.def.*bufr/tables/0/local/0/98/0/sequence.def" $fLog grep -q "ECCODES ERROR.*unable to get hash value for sequences" $fLog +# ECC-1739 +sample=$ECCODES_SAMPLES_PATH/BUFR3.tmpl +${tools_dir}/bufr_set -s masterTablesVersionNumber=255,localTablesVersionNumber=1 $sample $fBufrTmp +set +e +${tools_dir}/bufr_dump -p $fBufrTmp >$fLog 2>&1 +status=$? +set -e +grep -q "ECCODES ERROR.*unable to get hash value for sequences" $fLog + + # Clean up rm -f $fLog