forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rudi Grinberg <[email protected]>
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
test/blackbox-tests/test-cases/virtual-libraries/github3636.t/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Reproduce bug in #3636. | ||
|
||
The bug occurs when (include_subdirs unqualified) is used. | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 2.7) | ||
> (package | ||
> (name testpkg)) | ||
> EOF | ||
|
||
$ mkdir vlib impl | ||
|
||
$ cat >vlib/dune <<EOF | ||
> (include_subdirs unqualified) | ||
> (library | ||
> (name vlib) | ||
> (public_name testpkg.vlib) | ||
> (virtual_modules greet)) | ||
> EOF | ||
$ cat >vlib/greet.mli <<EOF | ||
> val s : string | ||
> EOF | ||
$ cat >impl/dune <<EOF | ||
> (library | ||
> (name impl) | ||
> (public_name testpkg.impl) | ||
> (implements vlib)) | ||
> EOF | ||
$ cat >impl/greet.ml <<EOF | ||
> let s = "hello world" | ||
> EOF | ||
$ dune build @install | ||
$ mkdir exe | ||
$ cat >exe/dune-project <<EOF | ||
> (lang dune 2.7) | ||
> EOF | ||
$ cat >exe/dune <<EOF | ||
> (executable | ||
> (name foo) | ||
> (libraries testpkg.vlib testpkg.impl)) | ||
> EOF | ||
$ cat >exe/foo.ml <<EOF | ||
> print_endline Vlib.Greet.s | ||
> EOF | ||
$ OCAMLPATH=$PWD/_build/install/default/lib dune exec --root exe -- ./foo.exe | ||
Entering directory 'exe' | ||
Entering directory 'exe' | ||
File "foo.ml", line 1, characters 14-26: | ||
1 | print_endline Vlib.Greet.s | ||
^^^^^^^^^^^^ | ||
Error: Unbound module Vlib | ||
[1] |