Add a test where an action modify one of its dependency (#923)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
parent
793a0b7c17
commit
e886e948b7
|
@ -1,3 +1,11 @@
|
|||
(alias
|
||||
(name action-modifying-a-dependency)
|
||||
(deps (package dune) (source_tree test-cases/action-modifying-a-dependency))
|
||||
(action
|
||||
(chdir
|
||||
test-cases/action-modifying-a-dependency
|
||||
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
|
||||
|
||||
(alias
|
||||
(name aliases)
|
||||
(deps (package dune) (source_tree test-cases/aliases))
|
||||
|
@ -566,6 +574,7 @@
|
|||
(alias
|
||||
(name runtest)
|
||||
(deps
|
||||
(alias action-modifying-a-dependency)
|
||||
(alias aliases)
|
||||
(alias bad-alias-error)
|
||||
(alias block-strings)
|
||||
|
@ -635,6 +644,7 @@
|
|||
(alias
|
||||
(name runtest-no-deps)
|
||||
(deps
|
||||
(alias action-modifying-a-dependency)
|
||||
(alias aliases)
|
||||
(alias bad-alias-error)
|
||||
(alias block-strings)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
hello
|
|
@ -0,0 +1,5 @@
|
|||
;; This test erroneously modify one of its dependencies
|
||||
(alias
|
||||
(name x)
|
||||
(deps data (universe))
|
||||
(action (system "echo hello >> data")))
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
|
@ -0,0 +1,22 @@
|
|||
In this test the "x" alias depends on the file "data" but the action
|
||||
associated to "x" appends a line to "data". The current behavior is
|
||||
that the file in _build just keeps growing. The expected behavior is
|
||||
an error from Dune telling the user that this is not allowed.
|
||||
|
||||
$ dune build @x
|
||||
$ cat _build/default/data
|
||||
hello
|
||||
hello
|
||||
|
||||
$ dune build @x
|
||||
$ cat _build/default/data
|
||||
hello
|
||||
hello
|
||||
hello
|
||||
|
||||
$ dune build @x
|
||||
$ cat _build/default/data
|
||||
hello
|
||||
hello
|
||||
hello
|
||||
hello
|
Loading…
Reference in New Issue