Add blackbox test for select construct (#363)
This commit is contained in:
parent
2cab60b150
commit
b7dd41fc6e
|
@ -128,3 +128,9 @@
|
|||
(chdir test-cases/odoc
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((files_recursively_in test-cases/select)))
|
||||
(action
|
||||
(chdir test-cases/select
|
||||
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
let message = "bar has no unix"
|
|
@ -0,0 +1 @@
|
|||
let message = "bar has unix"
|
|
@ -0,0 +1 @@
|
|||
let message = "foo has fake"
|
|
@ -0,0 +1 @@
|
|||
let message = "foo has no fake"
|
|
@ -0,0 +1,16 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(executable
|
||||
((name main)
|
||||
(libraries
|
||||
((select bar.ml from
|
||||
(unix -> bar_unix.ml)
|
||||
(!unix -> bar_no_unix.ml))
|
||||
(select foo.ml from
|
||||
(fakefoobar -> foo_fake.ml)
|
||||
(!fakefoobar -> foo_no_fake.ml))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps (main.exe))
|
||||
(action (run ${<}))))
|
|
@ -0,0 +1,2 @@
|
|||
print_endline Bar.message;;
|
||||
print_endline Foo.message;;
|
|
@ -0,0 +1,12 @@
|
|||
$ $JBUILDER runtest -j1 --root .
|
||||
ocamldep main.depends.ocamldep-output
|
||||
ocamlc bar.{cmi,cmo,cmt}
|
||||
ocamlc foo.{cmi,cmo,cmt}
|
||||
ocamlopt bar.{cmx,o}
|
||||
ocamlopt foo.{cmx,o}
|
||||
ocamlc main.{cmi,cmo,cmt}
|
||||
ocamlopt main.{cmx,o}
|
||||
ocamlopt main.exe
|
||||
main alias runtest
|
||||
bar has unix
|
||||
foo has no fake
|
Loading…
Reference in New Issue