diff --git a/test/passing/dune.inc b/test/passing/dune.inc index 9c10956cda..3fbbe502f8 100644 --- a/test/passing/dune.inc +++ b/test/passing/dune.inc @@ -9031,6 +9031,42 @@ (package ocamlformat) (action (diff tests/module_item_spacing.mli.js-err module_item_spacing.mli.js-stderr))) +(rule + (deps tests/.ocamlformat ) + (package ocamlformat) + (action + (with-stdout-to module_modes.mli.stdout + (with-stderr-to module_modes.mli.stderr + (run %{bin:ocamlformat} --margin-check %{dep:tests/module_modes.mli}))))) + +(rule + (alias runtest) + (package ocamlformat) + (action (diff tests/module_modes.mli.ref module_modes.mli.stdout))) + +(rule + (alias runtest) + (package ocamlformat) + (action (diff tests/module_modes.mli.err module_modes.mli.stderr))) + +(rule + (deps tests/.ocamlformat ) + (package ocamlformat) + (action + (with-stdout-to module_modes.mli.js-stdout + (with-stderr-to module_modes.mli.js-stderr + (run %{bin:ocamlformat} --profile=janestreet --enable-outside-detected-project --disable-conf-files %{dep:tests/module_modes.mli}))))) + +(rule + (alias runtest) + (package ocamlformat) + (action (diff tests/module_modes.mli.js-ref module_modes.mli.js-stdout))) + +(rule + (alias runtest) + (package ocamlformat) + (action (diff tests/module_modes.mli.js-err module_modes.mli.js-stderr))) + (rule (deps tests/.ocamlformat ) (package ocamlformat) diff --git a/test/passing/tests/module_modes.mli b/test/passing/tests/module_modes.mli new file mode 100644 index 0000000000..1e1b0b37d7 --- /dev/null +++ b/test/passing/tests/module_modes.mli @@ -0,0 +1,21 @@ +@@ portable + +type t + +val portable : t +val nonportable : t @@ nonportable + +module T : sig + val portable : t + val portable : t @@ nonportable +end + +module T : sig @@ nonportable + val portable : t + val portable : t @@ nonportable +end + +module (T @ nonportable) : sig @@ portable + val portable : t + val nonportable : t @@ nonportable +end diff --git a/test/passing/tests/module_modes.mli.js-ref b/test/passing/tests/module_modes.mli.js-ref new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/passing/tests/module_modes.mli.ref b/test/passing/tests/module_modes.mli.ref new file mode 100644 index 0000000000..e69de29bb2