Skip to content

Commit

Permalink
Add a test case for promoting a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cpitclaudel committed May 23, 2020
1 parent d29cb85 commit be9de5a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,17 @@
test-cases/promote
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

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

(rule
(alias quoting)
(deps (package dune) (source_tree test-cases/quoting) (alias test-deps))
Expand Down Expand Up @@ -3222,6 +3233,7 @@
(alias private-public-overlap)
(alias project-root)
(alias promote)
(alias promote-directory)
(alias quoting)
(alias re-exported-deps)
(alias reason)
Expand Down Expand Up @@ -3494,6 +3506,7 @@
(alias private-modules)
(alias project-root)
(alias promote)
(alias promote-directory)
(alias quoting)
(alias re-exported-deps)
(alias redirections)
Expand Down
7 changes: 7 additions & 0 deletions test/blackbox-tests/test-cases/promote-directory/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(rule
(mode (promote (until-clean)))
(targets x/)
(action
(progn
(bash "mkdir -p x")
(bash "echo z > x/y"))))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.5)
5 changes: 5 additions & 0 deletions test/blackbox-tests/test-cases/promote-directory/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Check that directories are correctly promoted

$ dune build x
$ cat x/y
z

0 comments on commit be9de5a

Please sign in to comment.