summaryrefslogtreecommitdiffstats
path: root/test/Driver/verbose-output-quoting.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/verbose-output-quoting.c')
-rw-r--r--test/Driver/verbose-output-quoting.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Driver/verbose-output-quoting.c b/test/Driver/verbose-output-quoting.c
new file mode 100644
index 0000000000..1e1afdb96f
--- /dev/null
+++ b/test/Driver/verbose-output-quoting.c
@@ -0,0 +1,10 @@
+// REQUIRES: shell
+// RUN: %clang --verbose -DSPACE="a b" -c %s 2>&1 | FileCheck -check-prefix=SPACE -strict-whitespace %s
+// RUN: %clang --verbose -DQUOTES=\"\" -c %s 2>&1 | FileCheck -check-prefix=QUOTES -strict-whitespace %s
+// RUN: %clang --verbose -DBACKSLASH=\\ -c %s 2>&1 | FileCheck -check-prefix=BACKSLASH -strict-whitespace %s
+// RUN: %clang --verbose -DDOLLAR=\$ -c %s 2>&1 | FileCheck -check-prefix=DOLLAR -strict-whitespace %s
+
+// SPACE: -cc1 {{.*}} -D "SPACE=a b"
+// QUOTES: -cc1 {{.*}} -D "QUOTES=\"\""
+// BACKSLASH: -cc1 {{.*}} -D "BACKSLASH=\\"
+// DOLLAR: -cc1 {{.*}} -D "DOLLAR=\$"