diff options
Diffstat (limited to 'clang/test/Preprocessor/output_paste_avoid.c')
-rw-r--r-- | clang/test/Preprocessor/output_paste_avoid.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/clang/test/Preprocessor/output_paste_avoid.c b/clang/test/Preprocessor/output_paste_avoid.c index b23d22a7963..ff8afc3e47a 100644 --- a/clang/test/Preprocessor/output_paste_avoid.c +++ b/clang/test/Preprocessor/output_paste_avoid.c @@ -1,18 +1,23 @@ -// RUN: clang-cc -E %s | grep '+ + - - + + = = =' && -// RUN: clang-cc -E %s | not grep -F '...' && -// RUN: clang-cc -E %s | not grep -F 'L"str"' - +// RUN: clang-cc -E %s -o %t && // This should print as ".. ." to avoid turning into ... +// RUN: grep -F 'A: . . .' %t && #define y(a) ..a -y(.) +A: y(.) + +// RUN: grep -F 'C: .. .' %t && +#define DOT . +C: ..DOT + +// RUN: grep -F 'D: + + - - + + = = =' %t && #define PLUS + #define EMPTY #define f(x) =x= -+PLUS -EMPTY- PLUS+ f(=) +D: +PLUS -EMPTY- PLUS+ f(=) +// RUN: grep -F 'E: L "str"' %t // Should expand to L "str" not L"str" #define test(x) L#x -test(str) +E: test(str) |