diff --git a/test/blackbox-tests/test-cases/top-closed-mli-only.t b/test/blackbox-tests/test-cases/top-closed-mli-only.t new file mode 100644 index 00000000000..71a86a6bea2 --- /dev/null +++ b/test/blackbox-tests/test-cases/top-closed-mli-only.t @@ -0,0 +1,49 @@ +This test demonstrates a dependency being pulled via an mli only module: + + $ cat >dune-project < (lang dune 3.7) + > EOF + + $ lib=foo + + $ cat >dune < (library + > (name $lib) + > (wrapped false) + > (modules_without_implementation uast)) + > EOF + + $ cat >identifier.ml < let create () = () + > EOF + $ cat >identifier.mli < val create : unit -> unit + > EOF + + $ cat >uast.mli < module Identifier = Identifier + > EOF + + $ cat >upretty_printer.ml < let f () = Uast.Identifier.create () + > EOF + + $ mkdir bin + $ cat >bin/dune < (executable + > (name use) + > (libraries $lib)) + > EOF + + $ cat >bin/use.ml < let () = Upretty_printer.f () + > EOF + +Build in development mode: + + $ dune exec bin/use.exe + +And now in release + + $ dune exec bin/use.exe --release 2>&1 | grep -v "cd _build" + [1]