Skip to content

Commit

Permalink
Added newly passing test
Browse files Browse the repository at this point in the history
Signed-off-by: Ambre Austen Suhamy <[email protected]>
  • Loading branch information
ElectreAAS committed Jan 10, 2025
1 parent 797970b commit d3fddfe
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/blackbox-tests/test-cases/promote/deep-subdir.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Tests for promoting directory targets
-------------------------------------

$ cat > dune-project << EOF
> (lang dune 3.0)
> (using directory-targets 0.1)
> EOF

$ cat > dune << EOF
> (rule
> (deps
> (source_tree deep))
> (targets
> (dir deep_copied))
> (mode promote)
> (action
> (run cp -r deep deep_copied)))

Let's create the directory structure we are going to promote
(as a copy on another dir):

$ mkdir -p deep/a/
$ touch deep/a/deep_file
$ touch deep/base_file

Let's try this:

$ dune build deep_copied

This one works. Now, let's add a layer between base_file and deep_file:

$ rm -rf deep
$ mkdir -p deep/a/b/
$ touch deep/a/b/deep_file
$ touch deep/base_file

$ dune build deep_copied

It now works!

0 comments on commit d3fddfe

Please sign in to comment.