[cfe-commits] r109029 - in /cfe/trunk/test/Lexer: Inputs/preamble.txt preamble.c

Daniel Dunbar daniel at zuster.org
Wed Jul 21 12:40:01 PDT 2010


Author: ddunbar
Date: Wed Jul 21 14:40:01 2010
New Revision: 109029

URL: http://llvm.org/viewvc/llvm-project?rev=109029&view=rev
Log:
tests: Use FileCheck instead of external input; I think this test was failing on
Win32 because of line ending differences.

Removed:
    cfe/trunk/test/Lexer/Inputs/preamble.txt
Modified:
    cfe/trunk/test/Lexer/preamble.c

Removed: cfe/trunk/test/Lexer/Inputs/preamble.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/Inputs/preamble.txt?rev=109028&view=auto
==============================================================================
--- cfe/trunk/test/Lexer/Inputs/preamble.txt (original)
+++ cfe/trunk/test/Lexer/Inputs/preamble.txt (removed)
@@ -1,11 +0,0 @@
-// Preamble detection test: see below for comments and test commands.
-
-#include <blah>
-#ifndef FOO
-#else
-#ifdef BAR
-#elif WIBBLE
-#endif
-#pragma unknown
-#endif
-

Modified: cfe/trunk/test/Lexer/preamble.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/preamble.c?rev=109029&r1=109028&r2=109029&view=diff
==============================================================================
--- cfe/trunk/test/Lexer/preamble.c (original)
+++ cfe/trunk/test/Lexer/preamble.c Wed Jul 21 14:40:01 2010
@@ -1,5 +1,5 @@
 // Preamble detection test: see below for comments and test commands.
-
+//
 #include <blah>
 #ifndef FOO
 #else
@@ -21,5 +21,17 @@
 // 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 <blah>
+// 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
+
 





More information about the cfe-commits mailing list