Add test to show bug with expanding %{ocaml:..} forms

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-07-09 00:33:07 +07:00 committed by Jérémie Dimino
parent a968a9e361
commit 629b3d07ee
4 changed files with 21 additions and 0 deletions

View File

@ -436,6 +436,14 @@
test-cases/null-dep
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ocaml-config-macro)
(deps (package dune) (source_tree test-cases/ocaml-config-macro))
(action
(chdir
test-cases/ocaml-config-macro
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ocaml-syntax)
(deps (package dune) (source_tree test-cases/ocaml-syntax))
@ -698,6 +706,7 @@
(alias multiple-private-libs)
(alias no-installable-mode)
(alias null-dep)
(alias ocaml-config-macro)
(alias ocaml-syntax)
(alias ocamldep-multi-stanzas)
(alias odoc)
@ -773,6 +782,7 @@
(alias misc)
(alias no-installable-mode)
(alias null-dep)
(alias ocaml-config-macro)
(alias ocaml-syntax)
(alias ocamldep-multi-stanzas)
(alias output-obj)

View File

@ -0,0 +1,3 @@
(rule
(targets x)
(action (with-stdout-to %{targets} (echo %{ocaml-config:system}))))

View File

@ -0,0 +1 @@
(lang dune 1.0)

View File

@ -0,0 +1,7 @@
%{ocaml-config:...} macros should be available. we don't print anything because
the values are all platform specific.
$ dune build
File "dune", line 3, characters 41-61:
Error: Unknown form: %{ocaml-config:system}
[1]