Skip to content

Commit

Permalink
test(melange): show that .js file emission doesn't respect flags
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
  • Loading branch information
anmonteiro committed Dec 30, 2024
1 parent 34de4d1 commit b3882ba
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/blackbox-tests/test-cases/melange/flags-for-emission.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Test compile_flags are passed to JS file emission

$ cat > dune-project <<EOF
> (lang dune 3.13)
> (using melange 0.1)
> EOF
$ cat > main.ml <<EOF
> let () = Js.log "hello"
> EOF
$ cat > dune <<EOF
> (melange.emit
> (target output)
> (emit_stdlib false)
> (modules main)
> (compile_flags :standard --mel-no-version-header))
> EOF
$ dune build @melange
File is generated with the "Generated by Melange" header even though we
specified the opposite in flags
$ cat _build/default/output/main.js
// Generated by Melange
'use strict';
console.log("hello");
/* Not a pure module */

0 comments on commit b3882ba

Please sign in to comment.