From db41c3549b9fef48cbdd8be49190e2c47d31132b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Thu, 12 Apr 2018 13:02:41 +0100 Subject: [PATCH] Add a test showing a weird quoting problem (#699) --- test/blackbox-tests/jbuild | 11 +++++++++++ test/blackbox-tests/test-cases/quoting/jbuild | 3 +++ test/blackbox-tests/test-cases/quoting/run.t | 9 +++++++++ 3 files changed, 23 insertions(+) create mode 100644 test/blackbox-tests/test-cases/quoting/jbuild create mode 100644 test/blackbox-tests/test-cases/quoting/run.t diff --git a/test/blackbox-tests/jbuild b/test/blackbox-tests/jbuild index becfd2ea..4d9bafd2 100644 --- a/test/blackbox-tests/jbuild +++ b/test/blackbox-tests/jbuild @@ -469,3 +469,14 @@ (progn (run ${exe:cram.exe} run.t) (diff? run.t run.t.corrected)))))) + +(alias + ((name runtest) + (deps ((package jbuilder) + (files_recursively_in test-cases/quoting))) + (action + (chdir test-cases/quoting + (progn + (run ${exe:cram.exe} run.t) + (diff? run.t run.t.corrected)))))) + diff --git a/test/blackbox-tests/test-cases/quoting/jbuild b/test/blackbox-tests/test-cases/quoting/jbuild new file mode 100644 index 00000000..648656a6 --- /dev/null +++ b/test/blackbox-tests/test-cases/quoting/jbuild @@ -0,0 +1,3 @@ +(rule + ((targets (x y)) + (action (with-stdout-to ${@} (echo foo))))) diff --git a/test/blackbox-tests/test-cases/quoting/run.t b/test/blackbox-tests/test-cases/quoting/run.t new file mode 100644 index 00000000..ade020b2 --- /dev/null +++ b/test/blackbox-tests/test-cases/quoting/run.t @@ -0,0 +1,9 @@ +This behavior is surprising, we should get an error about the fact +that ${@} is not quoted and doesn't contain exactly 1 element + + $ jbuilder build x + Error: Rule failed to generate the following targets: + - x + - y + [1] +