Skip to content

Commit 1fa62be

Browse files
committedOct 19, 2018
ounit byte as string
1 parent fb69668 commit 1fa62be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎jscomp/ounit/oUnit.ml

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ let assert_command
231231
(* Dump process output to stderr *)
232232
begin
233233
let chn = open_in fn_out in
234-
let buff = String.make 4096 'X' in
234+
let buff = Bytes.make 4096 'X' in
235235
let len = ref (-1) in
236236
while !len <> 0 do
237-
len := input chn buff 0 (String.length buff);
238-
OUnitLogger.printf !global_logger "%s" (String.sub buff 0 !len);
237+
len := input chn buff 0 (Bytes.length buff);
238+
OUnitLogger.printf !global_logger "%s" (Bytes.to_string @@ Bytes.sub buff 0 !len);
239239
done;
240240
close_in chn
241241
end;

0 commit comments

Comments
 (0)