-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: --ignore-promoted-rules and internal rules
reproduce #8417 Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: dc52a340-79a9-4d37-a486-0c0d168111d5 -->
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
test/blackbox-tests/test-cases/ignore-promoted-rules-internal-rules.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,32 @@ | ||
This test demonstrates the interaction between --ignore-promoted-rules and | ||
internal promote rules (like generating opam files) | ||
|
||
Reported in #8417 | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang 3.10) | ||
> (generate_opam_files true) | ||
> (package | ||
> (name foo)) | ||
> EOF | ||
|
||
$ dune build foo.opam | ||
File "dune-project", line 1, characters 0-11: | ||
1 | (lang 3.10) | ||
^^^^^^^^^^^ | ||
Error: Invalid first line, expected: (lang <lang> <version>) | ||
[1] | ||
$ echo "extra" >> foo.opam | ||
$ cat foo.opam | ||
extra | ||
|
||
This should not modify the file now | ||
|
||
$ dune build --ignore-promoted-rules foo.opam | ||
File "dune-project", line 1, characters 0-11: | ||
1 | (lang 3.10) | ||
^^^^^^^^^^^ | ||
Error: Invalid first line, expected: (lang <lang> <version>) | ||
[1] | ||
$ cat foo.opam | ||
extra |