Testing: Increase coverage

This commit is contained in:
Shahram Najm 2023-08-26 19:33:15 +01:00
parent 4348d1c641
commit 976cd94709
2 changed files with 23 additions and 1 deletions

View File

@ -24,7 +24,7 @@ cd $temp_dir
# -----------------------------
cp ${data_dir}/mixed.grib ./
input=mixed.grib
${tools_dir}/codes_split_file 3 $input
${tools_dir}/codes_split_file -v 3 $input
# There should now be 3 new files. Make sure they are valid
${tools_dir}/grib_ls mixed.grib_001
${tools_dir}/grib_ls mixed.grib_002
@ -74,6 +74,18 @@ status=$?
set -e
[ $status -eq 1 ]
set +e
${tools_dir}/codes_split_file 9 /dev/null
status=$?
set -e
[ $status -eq 1 ]
set +e
${tools_dir}/codes_split_file 0 $input
status=$?
set -e
[ $status -eq 1 ]
# Clean up
cd $test_dir

View File

@ -98,4 +98,14 @@ if [ $HAVE_JPEG -eq 0 ]; then
set -e
fi
# Use -s option
file=$data_dir/sample.grib2
${tools_dir}/grib_dump -s year=1909 $file > $temp 2>&1
grep -q "dataDate = 19090206" $temp
# Skip handle
${tools_dir}/grib_dump -w count=4 $file > $temp 2>&1
# Clean up
rm -f $temp