Skip to content

Commit

Permalink
test(melange): augment a test case for ocaml-flags (ocaml#10421)
Browse files Browse the repository at this point in the history
* test(melange): replace wrong test description

was fixed in ocaml#6953

Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>

* test(melange): add an extra test case to ocaml-flags.t

Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>

---------

Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
  • Loading branch information
anmonteiro committed Apr 13, 2024
1 parent ad0020c commit 497871a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Example using melange.emit, copy_files and include_subdirs
$ node $src
hello from file

Now add include_subdirs unqualified to show issue
Works with `(include_subdirs unqualified)` too

$ echo "(include_subdirs unqualified)" >> src/dune

Expand Down
19 changes: 19 additions & 0 deletions test/blackbox-tests/test-cases/melange/ocaml-flags.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ Building does not fail, warnings are silenced
$ node _build/default/output/main.js
hello

Update dune file to use flags

$ cat > dune <<EOF
> (melange.emit
> (target output)
> (emit_stdlib false)
> (modules main)
> (flags -w -14-26))
> EOF

Building should fail as `flags` are not supported in melange emit stanzas

$ dune build output/main.js
File "dune", line 5, characters 2-7:
5 | (flags -w -14-26))
^^^^^
Error: Unknown field flags
[1]

Update dune file to use ocamlc_flags

$ cat > dune <<EOF
Expand Down

0 comments on commit 497871a

Please sign in to comment.