mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
try to fix tests that fail on mac OS
This commit is contained in:
parent
8a60d44946
commit
089a1bec16
3 changed files with 14 additions and 6 deletions
2
dune
2
dune
|
|
@ -1,6 +1,6 @@
|
|||
(rule
|
||||
(targets README.md.corrected)
|
||||
(deps (package containers) (package containers-data) ./src/mdx_runner.exe)
|
||||
(deps (package containers-data) ./src/mdx_runner.exe)
|
||||
(action (run ./src/mdx_runner.exe)))
|
||||
|
||||
(alias
|
||||
|
|
|
|||
|
|
@ -2,9 +2,16 @@
|
|||
open Printf
|
||||
|
||||
let just_copy () =
|
||||
CCIO.with_out "README.md.corrected" (fun oc ->
|
||||
CCIO.with_in "README.md" (fun ic ->
|
||||
CCIO.copy_into ic oc))
|
||||
let ic = open_in "README.md" in
|
||||
let len = in_channel_length ic in
|
||||
let buf = Bytes.create len in
|
||||
really_input ic buf 0 len;
|
||||
close_in_noerr ic;
|
||||
|
||||
let oc = open_out "README.md.corrected" in
|
||||
output oc buf 0 len;
|
||||
flush oc;
|
||||
close_out_noerr oc
|
||||
|
||||
let () =
|
||||
try
|
||||
|
|
|
|||
|
|
@ -526,7 +526,8 @@ module Make(P : PARAM) = struct
|
|||
let sequence_l l = match l with
|
||||
| [] -> return []
|
||||
| _ :: _ ->
|
||||
sequence_ (L_ l) (fun () -> List.map get_nolock_ l)
|
||||
let l = List.rev l in
|
||||
sequence_ (L_ l) (fun () -> List.rev_map get_nolock_ l)
|
||||
|
||||
(* reverse twice *)
|
||||
let map_l f l =
|
||||
|
|
@ -557,7 +558,7 @@ module Make(P : PARAM) = struct
|
|||
(*$R
|
||||
let l = CCList.(1 -- 100_000) in
|
||||
let l' = l
|
||||
|> List.map
|
||||
|> CCList.map
|
||||
(fun x -> Fut.make (fun () -> 1))
|
||||
|> Fut.sequence_l
|
||||
|> Fut.map (List.fold_left (+) 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue