Add test for using a dune library with ocamlfind
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
939341af16
commit
0677c2d79c
|
@ -492,6 +492,14 @@
|
|||
test-cases/select
|
||||
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
|
||||
|
||||
(alias
|
||||
((name use-meta)
|
||||
(deps ((package dune) (files_recursively_in test-cases/use-meta)))
|
||||
(action
|
||||
(chdir
|
||||
test-cases/use-meta
|
||||
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
|
||||
|
||||
(alias
|
||||
((name utop)
|
||||
(deps ((package dune) (files_recursively_in test-cases/utop)))
|
||||
|
@ -558,6 +566,7 @@
|
|||
(alias scope-bug)
|
||||
(alias scope-ppx-bug)
|
||||
(alias select)
|
||||
(alias use-meta)
|
||||
(alias utop)))))
|
||||
|
||||
(alias
|
||||
|
@ -609,7 +618,8 @@
|
|||
(alias redirections)
|
||||
(alias scope-bug)
|
||||
(alias scope-ppx-bug)
|
||||
(alias select)))))
|
||||
(alias select)
|
||||
(alias use-meta)))))
|
||||
|
||||
(alias ((name runtest-disabled) (deps ((alias reason)))))
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
(library
|
||||
((name foobarlib)
|
||||
(public_name foobarlib)
|
||||
(libraries (str))))
|
|
@ -0,0 +1,4 @@
|
|||
open Str
|
||||
|
||||
let foo () =
|
||||
print_endline "foobarlib"
|
|
@ -0,0 +1 @@
|
|||
let () = Foobarlib.foo ()
|
|
@ -0,0 +1,2 @@
|
|||
$ dune build && dune exec -- ocamlfind opt -package foobarlib -linkpkg main.ml -o main.exe && ./main.exe
|
||||
foobarlib
|
Loading…
Reference in New Issue