Switch tests from grep to FileCheck

llvm-svn: 142699
This commit is contained in:
Douglas Gregor 2011-10-21 23:20:41 +00:00
parent 7c6d7b83c1
commit 0a92de06f0
2 changed files with 10 additions and 5 deletions

View 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

View 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.