File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2121 ctypes
2222 ctypes-foreign
2323 ( ounit2 :with -test)
24- ( stdio :with -test)
2524 ) )
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ depends: [
2222 "ctypes"
2323 "ctypes-foreign"
2424 "ounit2" {with-test}
25- "stdio" {with-test}
2625 "odoc" {with-doc}
2726]
2827build: [
Original file line number Diff line number Diff line change 11open Test_utils
22open OUnit2
33open GObject_introspection
4- open Stdio
4+
5+ let input_lines ch =
6+ let rec aux acc =
7+ match input_line ch with
8+ | exception End_of_file -> List. rev acc
9+ | line -> aux (line :: acc)
10+ in
11+ aux []
512
613let test_get_version _ =
714 let major = Version. get_major_version () |> string_of_int in
@@ -10,8 +17,7 @@ let test_get_version _ =
1017 let version = String. concat " ." [ major; minor; micro ] in
1118 let run cmd =
1219 let inp = Unix. open_process_in cmd in
13- let r = In_channel. input_lines inp in
14- In_channel. close inp;
20+ let r = Fun. protect (fun () -> input_lines inp) ~finally: (fun () -> close_in inp) in
1521 List. hd r
1622 in
1723 let modversion =
You can’t perform that action at this time.
0 commit comments