Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
  • Loading branch information
nojb committed Aug 5, 2020
1 parent 08e5fa6 commit b7da698
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/blackbox-tests/test-cases/ocaml-syntax.t/run.t
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
$ dune runtest --force
ocaml syntax

Check that (include ...) works when generated using OCaml syntax.

$ mkdir -p foo && cd foo
$ cat >dune-project <<EOF
> (lang dune 2.5)
> EOF
$ cat >dune <<EOF
> (* -*- tuareg -*- *)
> let () = Jbuild_plugin.V1.send {|(include dune.inc)|}
> EOF
$ cat >dune.inc <<EOF
> (rule (with-stdout-to foo.txt (echo Hola!)))
> EOF
$ dune build --root . ./foo.txt
$ cat _build/default/foo.txt
Hola!
18 changes: 18 additions & 0 deletions test/blackbox-tests/test-cases/subdir-stanza.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,21 @@ In conjunction with dune generated files:
$ dune build ./sub/bar
$ cat _build/default/sub/bar
parent

subdir stanzas can also appear in included files

$ mkdir -p include/subdir; cd include
$ cat >dune-project <<EOF
> (lang dune 2.5)
> EOF
$ cat >dune <<EOF
> (include dune.inc)
> EOF
$ cat >dune.inc <<EOF
> (subdir subdir
> (rule
> (action (with-stdout-to hello.txt (echo "Hello from subdir\n")))))
> EOF
$ dune build --root . subdir/hello.txt
$ cat _build/default/subdir/hello.txt
Hello from subdir

0 comments on commit b7da698

Please sign in to comment.