Skip to content

Commit

Permalink
New test for link_flags in env
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo Heuzard <[email protected]>
  • Loading branch information
hhugo committed Dec 2, 2021
1 parent 5f49896 commit 4c3bfc6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/env/env-link_flags.t/a.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let () = print_endline "'A' was linked"
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/env/env-link_flags.t/main.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let () = print_endline "Starting main"

let _ = `no_reference_to_A

16 changes: 16 additions & 0 deletions test/blackbox-tests/test-cases/env/env-link_flags.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ cat >> dune-project <<EOF
> (lang dune 3.0)
> EOF

$ cat >> dune << EOF
> (library (name a)(modules a))
> (executable (name main) (modules main) (libraries a))
> (env (linkall-profile (link_flags (:standard -linkall))))
> EOF

$ dune exec ./main.exe
Starting main

$ dune exec ./main.exe --profile linkall-profile
'A' was linked
Starting main

0 comments on commit 4c3bfc6

Please sign in to comment.