diff --git a/test/blackbox-tests/test-cases/utop/utop-module-collision.t/dune-project b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/dune-project new file mode 100644 index 00000000000..2f602c3083f --- /dev/null +++ b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/dune-project @@ -0,0 +1 @@ +(lang dune 3.10) diff --git a/test/blackbox-tests/test-cases/utop/utop-module-collision.t/init_react.ml b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/init_react.ml new file mode 100644 index 00000000000..00cb3cf19a7 --- /dev/null +++ b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/init_react.ml @@ -0,0 +1 @@ +React.run ();; diff --git a/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/dune b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/dune new file mode 100644 index 00000000000..8a1235be49f --- /dev/null +++ b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/dune @@ -0,0 +1,2 @@ +(library + (name react)) diff --git a/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/react.ml b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/react.ml new file mode 100644 index 00000000000..0cd324d7b5f --- /dev/null +++ b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/react/react.ml @@ -0,0 +1 @@ +let run () = print_endline "hello in utop" diff --git a/test/blackbox-tests/test-cases/utop/utop-module-collision.t/run.t b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/run.t new file mode 100644 index 00000000000..5adecb9bbc9 --- /dev/null +++ b/test/blackbox-tests/test-cases/utop/utop-module-collision.t/run.t @@ -0,0 +1,7 @@ + $ opam_prefix="$(opam var prefix)" + $ export BUILD_PATH_PREFIX_MAP="/OPAM_PREFIX=$opam_prefix:$BUILD_PATH_PREFIX_MAP" + + $ dune utop react -- init_react.ml + File "react/react.cma(React)", line 1: + Warning 31 [module-linked-twice]: files react/react.cma(React) and /OPAM_PREFIX/lib/react/react.cma(React) both define a module named React + hello in utop