Skip to content

Commit

Permalink
Get tests working on Windows (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarty authored May 5, 2020
1 parent 1c4c25c commit 1af1317
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
4 changes: 2 additions & 2 deletions examples/ic.expected
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let () =
set_binary_mode_out stdout true;
let ic = open_in_bin "ic.ml" in
[%defer close_in ic];
let length = in_channel_length ic in
let bytes = really_input_string ic length in
print_endline bytes

print_string bytes
3 changes: 2 additions & 1 deletion examples/ic.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
let () =
set_binary_mode_out stdout true;
let ic = open_in_bin "ic.ml" in
[%defer close_in ic];
let length = in_channel_length ic in
let bytes = really_input_string ic length in
print_endline bytes
print_string bytes
9 changes: 1 addition & 8 deletions examples/ic_lwt.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
let promise =
let%lwt ic = Lwt_io.open_file ~mode:Lwt_io.input "ic_lwt.ml" in
[%defer.lwt Lwt_io.close ic];
let%lwt bytes = Lwt_io.read ic in
Lwt_io.printl bytes

let () = Lwt_main.run promise

Hello world
6 changes: 2 additions & 4 deletions examples/ic_lwt.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
let promise =
let%lwt ic = Lwt_io.open_file ~mode:Lwt_io.input "ic_lwt.ml" in
[%defer.lwt Lwt_io.close ic];
let%lwt bytes = Lwt_io.read ic in
Lwt_io.printl bytes
[%defer.lwt Lwt_io.write Lwt_io.stdout " world"];
Lwt_io.write Lwt_io.stdout "Hello"

let () = Lwt_main.run promise

0 comments on commit 1af1317

Please sign in to comment.