Merge pull request #834 from rgrinberg/quoting-test-quoted-case

Add quoted case to quoting test
This commit is contained in:
Rudi Grinberg 2018-06-01 17:13:17 +07:00 committed by GitHub
commit d708cc714d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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