diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-21 23:28:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-21 23:28:41 +0000 |
commit | e1614bb01cc429658b414a9e00603c66ae96d8f5 (patch) | |
tree | bc8a5bc36655ad7f5b4e752304fda9618af7f83c /test/Preprocessor/output_paste_avoid.c | |
parent | 914d3db20eb3126175f19901fadbbd7b268a3667 (diff) |
apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/output_paste_avoid.c')
-rw-r--r-- | test/Preprocessor/output_paste_avoid.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/test/Preprocessor/output_paste_avoid.c b/test/Preprocessor/output_paste_avoid.c index b23d22a796..ff8afc3e47 100644 --- a/test/Preprocessor/output_paste_avoid.c +++ b/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) |