mirror of https://github.com/ecmwf/eccodes.git
Testing: 'close' action and filepool
This commit is contained in:
parent
0c747f3b02
commit
c2668153ef
|
@ -344,6 +344,11 @@ grib_file* grib_get_file(const char* filename, int* err)
|
||||||
{
|
{
|
||||||
grib_file* file = NULL;
|
grib_file* file = NULL;
|
||||||
|
|
||||||
|
if (!file_pool.current) {
|
||||||
|
*err = GRIB_IO_PROBLEM;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (file_pool.current->name && !grib_inline_strcmp(filename, file_pool.current->name)) {
|
if (file_pool.current->name && !grib_inline_strcmp(filename, file_pool.current->name)) {
|
||||||
return file_pool.current;
|
return file_pool.current;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,5 +90,21 @@ set -e
|
||||||
grep -q "Cannot include file" $tempErr
|
grep -q "Cannot include file" $tempErr
|
||||||
|
|
||||||
|
|
||||||
|
# Close
|
||||||
|
# --------
|
||||||
|
cat > $fRules <<EOF
|
||||||
|
transient abcd = "afile";
|
||||||
|
close(abcd);
|
||||||
|
EOF
|
||||||
|
set +e
|
||||||
|
${tools_dir}/bufr_filter $fRules $ECCODES_SAMPLES_PATH/BUFR4.tmpl > $tempErr 2>&1
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -ne 0 ]
|
||||||
|
cat $tempErr
|
||||||
|
grep -q "Input output problem" $tempErr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -f $fLog $fRules $tempErr
|
rm -f $fLog $fRules $tempErr
|
||||||
|
|
Loading…
Reference in New Issue