Skip to content

Commit

Permalink
Added a test for #534
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremie Dimino authored and jeremiedimino committed Feb 21, 2018
1 parent 326e2f5 commit 4993c6b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,13 @@
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected)))))))

(alias
((name runtest)
(deps ((files_recursively_in test-cases/github534)))
(action
(chdir test-cases/github534
(setenv JBUILDER ${bin:jbuilder}
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected)))))))
10 changes: 10 additions & 0 deletions test/blackbox-tests/test-cases/github534/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(executable
((name main)))

(rule
((targets (main.ml))
(deps ((glob_files optional.ml)
(glob_files *optional.ml)))
(action
(with-stdout-to ${@}
(run echo "let () = print_endline \"Hello World\"")))))
11 changes: 11 additions & 0 deletions test/blackbox-tests/test-cases/github534/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$ $JBUILDER exec ./main.exe --root . -j1 --display short
File "jbuild", line 1, characters 0-124:
Warning: Directory _build/default doesn't exist.
File "jbuild", line 1, characters 0-89:
Warning: Directory _build/default doesn't exist.
echo main.ml
ocamldep main.ml.d
ocamlc .main.eobjs/main.{cmi,cmo,cmt}
ocamlopt .main.eobjs/main.{cmx,o}
ocamlopt main.exe
Hello World

0 comments on commit 4993c6b

Please sign in to comment.