aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/assembler-with-cpp.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-20 16:28:22 +0000
committerChris Lattner <sabre@nondot.org>2009-03-20 16:28:22 +0000
commite966d9ae3e2d0b021e6290f91fb90b28cf736d84 (patch)
tree4eed9cff88c45dff36c28f075d3266ded2157978 /test/Preprocessor/assembler-with-cpp.c
parent15154b40d405948f6cae7834a6145b243ea5f0b3 (diff)
add tests for the various .S bugs I fixed on wednesday.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/assembler-with-cpp.c')
-rw-r--r--test/Preprocessor/assembler-with-cpp.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/test/Preprocessor/assembler-with-cpp.c b/test/Preprocessor/assembler-with-cpp.c
index bd13e11b99..2f520ecf07 100644
--- a/test/Preprocessor/assembler-with-cpp.c
+++ b/test/Preprocessor/assembler-with-cpp.c
@@ -1,6 +1,36 @@
-// RUN: clang -x assembler-with-cpp -E %s &&
-// RUN: not clang -x c -E %s
+// RUN: clang -x assembler-with-cpp -E %s > %t &&
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
#endif
+
+
+// Invalid token pasting is ok.
+// RUN: grep '1: X .' %t &&
+#define A X ## .
+1: A
+
+// Line markers are not linemarkers in .S files, they are passed through.
+// RUN: grep '# 321' %t &&
+# 321
+
+// Unknown directives are passed through.
+// RUN: grep '# B C' %t &&
+# B C
+
+// Unknown directives are expanded.
+// RUN: grep '# BAR42' %t &&
+#define D(x) BAR ## x
+# D(42)
+
+// Unmatched quotes are permitted.
+// RUN: grep "2: '" %t &&
+// RUN: grep '3: "' %t &&
+2: '
+3: "
+
+// Empty char literals are ok.
+// RUN: grep "4: ''" %t &&
+4: ''
+
+// RUN: true