Skip to content

Commit

Permalink
Adapt ocamlformat test
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
  • Loading branch information
nojb committed Jul 12, 2019
1 parent b134874 commit 5287216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions test/blackbox-tests/test-cases/dialects/run.t
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Test the (dialect ...) stanza inside the dune-project file.

$ dune build --display short @install @fmt
dune .formatted/dune
ocamlformat .formatted/main.mfi
ocamlformat .formatted/main.mf
$ dune build --display short @install
ocamldep .main.eobjs/main.mf.d
ocamldep .main.eobjs/main.mfi.d
ocamlc .main.eobjs/byte/main.{cmi,cmti}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
let process args ~output =
let oc = open_out output in
Printf.fprintf oc "Sys.argv: %s\n" (String.concat " " (Array.to_list args));
Printf.fprintf oc "ocamlformat output\n";
close_out oc
let process args =
Printf.printf "Sys.argv: %s\n" (String.concat " " (Array.to_list args));
Printf.printf "ocamlformat output\n"

let () =
match Sys.argv with
| [| _ ; _; _; "--name"; _; "-o"; output|] -> process Sys.argv ~output
| [| _ ; _; _|] -> process Sys.argv
| _ -> assert false

0 comments on commit 5287216

Please sign in to comment.