Skip to content

Commit

Permalink
Add test for [subdirs]
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Mar 16, 2020
1 parent 6d243fd commit ccaedd2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1836,6 +1836,14 @@
test-cases/strict-package-deps
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

(rule
(alias subdir-stanza)
(deps (package dune) (source_tree test-cases/subdir-stanza))
(action
(chdir
test-cases/subdir-stanza
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

(rule
(alias subst)
(deps (package dune) (source_tree test-cases/subst))
Expand Down Expand Up @@ -2607,6 +2615,7 @@
(alias stale-artifact-removal)
(alias stdlib-compilation)
(alias strict-package-deps)
(alias subdir-stanza)
(alias subst)
(alias syntax-versioning)
(alias target-dir-alias)
Expand Down Expand Up @@ -2864,6 +2873,7 @@
(alias stale-artifact-removal)
(alias stdlib-compilation)
(alias strict-package-deps)
(alias subdir-stanza)
(alias subst)
(alias syntax-versioning)
(alias target-dir-alias)
Expand Down
12 changes: 12 additions & 0 deletions test/blackbox-tests/test-cases/subdir-stanza/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$ echo "(lang dune 2.4)" > dune-project
$ cat >dune <<EOF
> (rule (with-stdout-to foo.txt (echo "bar")))
> (subdir
> bar
> (rule (with-stdout-to foo.txt (echo "bar"))))
> EOF
$ mkdir bar
$ touch bar/dune
$ dune build ./foo.txt ./bar/foo.txt
$ cat _build/default/foo.txt
bar

0 comments on commit ccaedd2

Please sign in to comment.