We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3727922 commit fb20cf7Copy full SHA for fb20cf7
1 file changed
tests/integrated.ml
@@ -157,11 +157,11 @@ let refname name =
157
Filename.chop_extension name ^ ".ref"
158
159
let reference name =
160
- if Sys.file_exists name then
+ if not (Sys.file_exists name) then "" else
161
let inc = open_in_bin name in
162
- really_input_string inc (in_channel_length inc)
163
- else
164
- ""
+ let s = really_input_string inc (in_channel_length inc) in
+ close_in inc;
+ s
165
166
let guard ~failure f x =
167
let guard = x ^ "/guard" in
0 commit comments