Add utop tests

This commit is contained in:
Rudi Grinberg 2017-12-22 19:31:25 +08:00
parent f365e8f157
commit a3806d7e3b
5 changed files with 21 additions and 0 deletions

View File

@ -148,3 +148,10 @@
(action
(chdir test-cases/ppx-rewriter
(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/utop)))
(action
(chdir test-cases/utop
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))

View File

@ -0,0 +1 @@
let run () = print_endline "hello in utop"

View File

@ -0,0 +1,4 @@
(jbuild_version 1)
(library
((name forutop)))

View File

@ -0,0 +1 @@
Forutop.run ();;

View File

@ -0,0 +1,8 @@
$ $JBUILDER utop -j1 --root . forutop -- init_forutop.ml
ocamldep forutop/.utop/utop.depends.ocamldep-output
ocamldep forutop/forutop.depends.ocamldep-output
ocamlc forutop/forutop.{cmi,cmo,cmt}
ocamlc forutop/.utop/utop.{cmi,cmo,cmt}
ocamlc forutop/forutop.cma
ocamlc forutop/.utop/utop.exe
hello in utop