Skip to content

Commit

Permalink
Fix tests not passing in Opam (#2635)
Browse files Browse the repository at this point in the history
Bug introduced in #2618.
The tests don't pass when run with `dune build -p` option, as it's done
in Opam.
  • Loading branch information
Julow authored Nov 29, 2024
1 parent 70830b5 commit e2bd0c5
Show file tree
Hide file tree
Showing 8 changed files with 1,258 additions and 316 deletions.
1,560 changes: 1,248 additions & 312 deletions test/passing/gen/dune.inc

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion test/passing/gen/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,21 @@ let emit_test test_name setup =
Printf.printf
{|
(rule
(deps .ocamlformat dune-project)%s
(deps .ocamlformat .hg)%s
(package ocamlformat)
(action
(with-stdout-to %s
(with-stderr-to %s.stderr
%s))))

(rule
(alias runtest)%s
(package ocamlformat)
(action (diff %s %s.stdout)))

(rule
(alias runtest)%s
(package ocamlformat)
(action (diff %s %s.stderr)))
|}
enabled_if_line output_fname test_name
Expand Down
2 changes: 2 additions & 0 deletions test/passing/refs.default/.hg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file ensures that OCamlformat don't consider parent directories when
searching for configuration.
1 change: 0 additions & 1 deletion test/passing/refs.default/dune-project

This file was deleted.

2 changes: 2 additions & 0 deletions test/passing/refs.janestreet/.hg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file ensures that OCamlformat don't consider parent directories when
searching for configuration.
1 change: 0 additions & 1 deletion test/passing/refs.janestreet/dune-project

This file was deleted.

2 changes: 2 additions & 0 deletions test/passing/refs.ocamlformat/.hg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file ensures that OCamlformat don't consider parent directories when
searching for configuration.
1 change: 0 additions & 1 deletion test/passing/refs.ocamlformat/dune-project

This file was deleted.

0 comments on commit e2bd0c5

Please sign in to comment.