-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(melange): demonstrate melange.emit doesn't respect
-p
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
- Loading branch information
1 parent
d4ceaa9
commit 53640ad
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
test/blackbox-tests/test-cases/melange/melange-emit-package.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,43 @@ | ||
|
||
$ mkdir lib test ppx | ||
$ cat > dune-project <<EOF | ||
> (lang dune 3.8) | ||
> (package (name my-ppx)) | ||
> (package (name mel-foo)) | ||
> (using melange 0.1) | ||
> EOF | ||
|
||
$ cat > ppx/dune <<EOF | ||
> (library | ||
> (name my_ppx) | ||
> (public_name my-ppx)) | ||
> EOF | ||
$ touch ppx/my_ppx.ml | ||
|
||
$ cat > lib/dune <<EOF | ||
> (library | ||
> (public_name mel-foo) | ||
> (name mel_foo) | ||
> (modes melange) | ||
> (preprocess (pps melange.ppx))) | ||
> EOF | ||
$ cat > lib/mel_foo.ml <<EOF | ||
> let x = "lib" | ||
> EOF | ||
|
||
$ cat > test/dune <<EOF | ||
> (melange.emit | ||
> (package mel-foo) | ||
> (target js-out) | ||
> (libraries mel-foo)) | ||
> EOF | ||
|
||
`melange.emit` is attached to the package `mel-foo`, so it shouldn't be built | ||
when building the other library | ||
|
||
$ dune build -p my-ppx | ||
File "test/dune", line 4, characters 12-19: | ||
4 | (libraries mel-foo)) | ||
^^^^^^^ | ||
Error: Library "mel-foo" not found. | ||
[1] |