diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Driver/response-file-extra-whitespace.c | 12 | ||||
-rw-r--r-- | clang/test/Driver/response-file.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/Driver/response-file-extra-whitespace.c b/clang/test/Driver/response-file-extra-whitespace.c new file mode 100644 index 00000000000..93b32bb5054 --- /dev/null +++ b/clang/test/Driver/response-file-extra-whitespace.c @@ -0,0 +1,12 @@ +// Check that clang is able to process response files with extra whitespace. +// We generate a dos-style file with \r\n for line endings, and then split +// some joined arguments (like "-x c") across lines to ensure that regular +// clang (not clang-cl) can process it correctly. +// +// RUN: echo -en "-x\r\nc\r\n-DTEST\r\n" > %t.0.txt +// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT +// SHORT: extern int it_works; + +#ifdef TEST +extern int it_works; +#endif diff --git a/clang/test/Driver/response-file.c b/clang/test/Driver/response-file.c index 208a941e872..bd336309adf 100644 --- a/clang/test/Driver/response-file.c +++ b/clang/test/Driver/response-file.c @@ -4,7 +4,7 @@ // Since this is a short response file, clang must not use a response file // to pass its parameters to other tools. This is only necessary for a large // number of parameters. -// RUN: echo "-DTEST" >> %t.0.txt +// RUN: echo "-DTEST" > %t.0.txt // RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT // SHORT-NOT: Arguments passed via response file // SHORT: extern int it_works; |