From: Daniel Dunbar Date: Wed, 21 Jul 2010 19:40:01 +0000 (+0000) Subject: tests: Use FileCheck instead of external input; I think this test was failing on X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0286de6212626616e57a8f61807c40af4ee549a2;p=clang tests: Use FileCheck instead of external input; I think this test was failing on Win32 because of line ending differences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109029 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Lexer/Inputs/preamble.txt b/test/Lexer/Inputs/preamble.txt deleted file mode 100644 index c5f7288fa5..0000000000 --- a/test/Lexer/Inputs/preamble.txt +++ /dev/null @@ -1,11 +0,0 @@ -// Preamble detection test: see below for comments and test commands. - -#include -#ifndef FOO -#else -#ifdef BAR -#elif WIBBLE -#endif -#pragma unknown -#endif - diff --git a/test/Lexer/preamble.c b/test/Lexer/preamble.c index b1f2fadd1c..c4f9c3ef34 100644 --- a/test/Lexer/preamble.c +++ b/test/Lexer/preamble.c @@ -1,5 +1,5 @@ // Preamble detection test: see below for comments and test commands. - +// #include #ifndef FOO #else @@ -21,5 +21,17 @@ int foo(); // Inputs/preamble.txt, since we diff against it. // RUN: %clang_cc1 -print-preamble %s > %t -// RUN: diff %t %S/Inputs/preamble.txt +// RUN: FileCheck < %t %s + +// CHECK: // Preamble detection test: see below for comments and test commands. +// CHECK-NEXT: // +// CHECK-NEXT: #include +// CHECK-NEXT: #ifndef FOO +// CHECK-NEXT: #else +// CHECK-NEXT: #ifdef BAR +// CHECK-NEXT: #elif WIBBLE +// CHECK-NEXT: #endif +// CHECK-NEXT: #pragma unknown +// CHECK-NEXT: #endif +