Skip to content
Snippets Groups Projects
Commit f424a597 authored by Alp Toker's avatar Alp Toker
Browse files

Fix and restore the macro-multiline.c test

This test didn't work as intended and was ultimately disabled some years ago in
r169458.

Indeed it's not clear if the '\n' was ever passed through to the driver
correctly given that lit would insert '&& {' at the newline.

Test rewritten to use printf/xargs to insert '\n' in a more reliable manner and
to use FileCheck for verification.

llvm-svn: 206703
parent 97fb5e12
No related branches found
No related tags found
No related merge requests found
// RUN: printf -- "-DX=A\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" | xargs -0 %clang -E %s | FileCheck -strict-whitespace %s
// REQUIRES: shell
// Per GCC -D semantics, \n and anything that follows is ignored.
// CHECK: {{^START A END$}}
START X END
// RUN: %clang -E %s "-DX=A
// RUN: THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" > %t
// RUN: grep "GOOD: A" %t
// RUN: not grep THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT %t
// rdar://6762183
GOOD: X
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment