Skip to content

Commit

Permalink
test: alias module regression
Browse files Browse the repository at this point in the history
Add test to make sure not to mark auto-generated modules as deprecated

Signed-off-by: Marek Kubica <[email protected]>
  • Loading branch information
Leonidas-from-XIV authored and rgrinberg committed Nov 23, 2022
1 parent 557a001 commit b682804
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/blackbox-tests/test-cases/alias-module-generated.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Test alias module for wrapped libraries that don't have a main module, i.e. the
wrap module is generated by dune.

$ cat >dune-project <<EOF
> (lang dune 3.5)
> EOF

$ cat >dune <<EOF
> (library
> (name foo))
> EOF
$ touch bar.ml

$ dune build
$ cat _build/default/foo.ml-gen
(* generated by dune *)

(** @canonical Foo.Bar *)
module Bar = Foo__Bar

module Foo = struct end
[@@deprecated "this module is shadowed"]

The final `Foo` module should not be marked as deprecated/shadowed, since it
does not shadow any module.

0 comments on commit b682804

Please sign in to comment.