]> granicus.if.org Git - clang/commitdiff
FileCheck-ize this test.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 8 Apr 2012 16:40:30 +0000 (16:40 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 8 Apr 2012 16:40:30 +0000 (16:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154289 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/pic.c

index ebc028ae179b4436386c4b541ece44d997fd7574..a65cef8409cd0c2963f1a5d22222b07e8824c061 100644 (file)
@@ -1,9 +1,12 @@
-// RUN: %clang -target i386-unknown-unknown -static -dM -E -o %t %s
-// RUN: grep '#define __PIC__' %t | count 0
-// RUN: grep '#define __pic__' %t | count 0
-// RUN: %clang -target i386-unknown-unknown -fpic -dM -E -o %t %s
-// RUN: grep '#define __PIC__ 1' %t | count 1
-// RUN: grep '#define __pic__ 1' %t | count 1
-// RUN: %clang -target i386-unknown-unknown -fPIC -dM -E -o %t %s
-// RUN: grep '#define __PIC__ 2' %t | count 1
-// RUN: grep '#define __pic__ 2' %t | count 1
+// RUN: %clang -target i386-unknown-unknown -static -dM -E -o - %s \
+// RUN:   | FileCheck --check-prefix=CHECK-STATIC %s
+// CHECK-STATIC-NOT: #define __PIC__
+// CHECK-STATIC-NOT: #define __pic__
+// RUN: %clang -target i386-unknown-unknown -fpic -dM -E -o - %s \
+// RUN:   | FileCheck --check-prefix=CHECK-LOWERPIC %s
+// CHECK-LOWERPIC: #define __PIC__ 1
+// CHECK-LOWERPIC: #define __pic__ 1
+// RUN: %clang -target i386-unknown-unknown -fPIC -dM -E -o - %s \
+// RUN:   | FileCheck --check-prefix=CHECK-UPPERPIC %s
+// CHECK-UPPERPIC: #define __PIC__ 2
+// CHECK-UPPERPIC: #define __pic__ 2