From 3f1347afc896b62fef9d89208f10e42b9c1b30c6 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 15 Dec 2023 19:51:08 +0000 Subject: [PATCH] Testing: Increase coverage --- tests/bufr_set.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/bufr_set.sh b/tests/bufr_set.sh index 6732b5c3b..cd48e3f6f 100755 --- a/tests/bufr_set.sh +++ b/tests/bufr_set.sh @@ -183,6 +183,20 @@ ${tools_dir}/bufr_set -s messageLength:s=333 $ECCODES_SAMPLES_PATH/BUFR4_local.t result=`${tools_dir}/bufr_get -p messageLength $fBufrTmp` [ "$result" = "333" ] + +#----------------------------------------------------------- +# Invalid masterTablesVersionNumber +#----------------------------------------------------------- +${tools_dir}/bufr_set -s masterTablesVersionNumber=255 $ECCODES_SAMPLES_PATH/BUFR4.tmpl $fBufrTmp +set +e +${tools_dir}/bufr_dump -p $fBufrTmp >& $fLog +status=$? +set -e +[ $status -ne 0 ] +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 + + # Clean up rm -f $fLog rm -f $fBufrTmp