Skip to content

Commit

Permalink
Merge pull request #35 from hhugo/fix-windows
Browse files Browse the repository at this point in the history
Fix for windows
  • Loading branch information
aalekseyev authored Nov 12, 2021
2 parents c2003b1 + 1693b3a commit 986043a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/expect_test_collector.ml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module Make (C : Expect_test_config_types.S) = struct

let create () =
let filename = Filename.temp_file "expect-test" "output" in
let chan = open_out filename in
let chan = open_out_bin filename in
before_test ~output:chan ~stdout ~stderr;
{ chan; filename = File.Name.of_string filename; saved = [] }
;;
Expand All @@ -120,7 +120,7 @@ module Make (C : Expect_test_config_types.S) = struct
let relative_filename t = File.Name.relative_to ~dir:(File.initial_dir ()) t.filename

let with_ic fname ~f =
let ic = open_in fname in
let ic = open_in_bin fname in
protect ~finally:(fun () -> close_in ic) ~f:(fun () -> f ic)
;;

Expand Down

0 comments on commit 986043a

Please sign in to comment.