]> granicus.if.org Git - clang/commitdiff
Switch tests from grep to FileCheck
authorDouglas Gregor <dgregor@apple.com>
Fri, 21 Oct 2011 23:20:41 +0000 (23:20 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 21 Oct 2011 23:20:41 +0000 (23:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142699 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/debug-info-compilation-dir.c
test/Driver/debug.c

index 4ffa1552cad735627c80761d15cf62fdc43dff21..4b472991498c4c59969a7feb94fcab459da5464a 100644 (file)
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -g %s -o - | \
-// RUN:   grep nonsense
+// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -g %s -o - | FileCheck -check-prefix=CHECK-NONSENSE %s
+// CHECK-NONSENSE: nonsense
+
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck -check-prefix=CHECK-DIR %s
+// CHECK-DIR: CodeGen
 
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | grep %S
index 742a1d8a00758e6175943f7bceb9f6d70a3f71ba..97f00d9b18a13586d294c3d16798cf80cee78cdc 100644 (file)
@@ -1,5 +1,8 @@
-// RUN: cd %S && %clang -### -g %s -c 2>&1 | grep '"-fdebug-compilation-dir" "'%S'"'
-// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | grep '"-fdebug-compilation-dir" "/foo"'
+// RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s
+// CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}}
+
+// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-FOO %s
+// CHECK-FOO: "-fdebug-compilation-dir" "/foo"
 
 // This test uses grep instead of FileCheck so that we get %S -> dirname
 // substitution.