@@ -286,39 +286,39 @@ struct
286286 | _ -> false )
287287 | Output_char _c , Res ((Result (Unit,Exn),_ ), r ) ->
288288 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
289- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
289+ | Closed , Error (Sys_error _ ) -> true
290290 | Open _ , Ok () -> true
291291 | _ -> false )
292292 | Output_byte _i , Res ((Result (Unit,Exn),_ ), r ) ->
293293 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
294- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
294+ | Closed , Error (Sys_error _ ) -> true
295295 | Open _ , Ok () -> true
296296 | _ -> false )
297- | Output_string _str , Res ((Result (Unit,Exn),_ ), r ) ->
297+ | Output_string str , Res ((Result (Unit,Exn),_ ), r ) ->
298298 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
299- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
300- (* | Closed, Ok () -> str = ""*) (* accepting this is actually against the above spec *)
299+ | Closed , Error (Sys_error _ ) -> true
300+ | Closed , Ok () -> str = " " (* accepting this is actually against the above spec *)
301301 | Open _ , Ok () -> true
302302 | _ -> false )
303- | Output_bytes _b , Res ((Result (Unit,Exn),_ ), r ) ->
303+ | Output_bytes b , Res ((Result (Unit,Exn),_ ), r ) ->
304304 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
305- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
306- (* | Closed, Ok () -> b = Bytes.empty*) (* accepting this is actually against the above spec *)
305+ | Closed , Error (Sys_error _ ) -> true
306+ | Closed , Ok () -> b = Bytes. empty (* accepting this is actually against the above spec *)
307307 | Open _ , Ok () -> true
308308 | _ -> false )
309309 | Output (b ,p ,l ), Res ((Result (Unit,Exn),_ ), r ) ->
310310 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
311- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
312- (* | Closed, Ok () -> l = 0*) (* accepting this is actually against the above spec *)
311+ | Closed , Error (Sys_error _ ) -> true
312+ | Closed , Ok () -> l = 0 (* accepting this is actually against the above spec *)
313313 | Open _ , Ok () -> true
314314 | (Open _ |Closed ), Error (Invalid_argument _ ) -> (* "output"*)
315315 let bytes_len = Bytes. length b in
316316 p < 0 || p > = bytes_len || l < 0 || p+ l > bytes_len
317317 | _ , _ -> false )
318318 | Output_substring (str ,p ,l ), Res ((Result (Unit,Exn),_ ), r ) ->
319319 (match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
320- | Closed , ( Ok () | Error (Sys_error _ )) -> true (* FIXME: temporarily accept Ok on closed channel *)
321- (* | Closed, Ok () -> l = 0*) (* accepting this is actually against the above spec *)
320+ | Closed , Error (Sys_error _ ) -> true
321+ | Closed , Ok () -> l = 0 (* accepting this is actually against the above spec *)
322322 | Open _ , Ok () -> true
323323 | (Open _ |Closed ), Error (Invalid_argument _ ) -> (* "output_substring"*)
324324 let str_len = String. length str in
0 commit comments