From 23bd6cc156dd6091bb43063f6853a23b56511418 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 4 Oct 2008 20:46:41 +0000 Subject: Add test/Driver. - env-include-paths.c is XFAIL as it exposed a bug. Add test/Coverage. - For tests which achieve code coverage but don't validate anything. llvm-svn: 57070 --- clang/test/Driver/env-include-paths.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 clang/test/Driver/env-include-paths.c (limited to 'clang/test/Driver/env-include-paths.c') diff --git a/clang/test/Driver/env-include-paths.c b/clang/test/Driver/env-include-paths.c new file mode 100644 index 00000000000..de4ba5b1b7e --- /dev/null +++ b/clang/test/Driver/env-include-paths.c @@ -0,0 +1,27 @@ +// RUN: clang -fsyntax-only -verify -DAS_SOURCE %s && +// RUN: env CPATH="" clang -fsyntax-only -verify -DAS_SOURCE %s && +// RUN: env CPATH="xyz:xyz" clang -fsyntax-only -verify -DAS_SOURCE %s && +// RUN: env CPATH="xyz::xyz" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s && +// RUN: env CPATH="../Driver" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s +// XFAIL + +#ifdef AS_SOURCE +#undef AS_SOURCE + +#define AS_INCLUDE + +#ifdef SHOULD_FIND +#include +#else +/* expected-error {{file not found}} */ #include +#endif + +#undef AS_INCLUDE + +#endif + +#ifdef AS_INCLUDE + +/* expected-warning {{Hello}} */ #warning "Hello" + +#endif -- cgit v1.2.3