Add quoted case to quoting test

When ${@}, the current behavior should be preserved

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-01 14:15:25 +07:00
parent 115ee93dd6
commit d17292f6cd
4 changed files with 14 additions and 5 deletions

View File

@ -0,0 +1,3 @@
(rule
((targets (x y))
(action (with-stdout-to ${@} (echo foo)))))

View File

@ -1,3 +0,0 @@
(rule
((targets (x y))
(action (with-stdout-to ${@} (echo foo)))))

View File

@ -0,0 +1,3 @@
(rule
((targets (s t))
(action (with-stdout-to "${@}" (echo foo)))))

View File

@ -1,9 +1,15 @@
This behavior is surprising, we should get an error about the fact
that ${@} is not quoted and doesn't contain exactly 1 element
$ dune build x
$ dune build --root bad x 2>&1 | grep -v Entering
Error: Rule failed to generate the following targets:
- x
- y
[1]
The targets should only be interpreted as a single path when quoted
$ dune build --root good s 2>&1 | grep -v Entering
Error: Rule failed to generate the following targets:
- s
- t