Skip to content

Commit

Permalink
Fixed tests where grep was not matching the linefeed
Browse files Browse the repository at this point in the history
When files are synchronized locally as CRLF on Windows, grep didn't match the newline. Switched to FileCheck instead.

Differential Revision: https://reviews.llvm.org/D61496

llvm-svn: 360467
  • Loading branch information
aganea committed May 10, 2019
1 parent 37b8012 commit 904a3e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion clang/test/Preprocessor/indent_macro.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -E %s | grep '^ zzap$'
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace
// CHECK: zzap

// zzap is on a new line, should be indented.
#define BLAH zzap
Expand Down
9 changes: 6 additions & 3 deletions clang/test/Preprocessor/macro_fn_varargs_named.c
@@ -1,6 +1,9 @@
// RUN: %clang_cc1 -E %s | grep '^a: x$'
// RUN: %clang_cc1 -E %s | grep '^b: x y, z,h$'
// RUN: %clang_cc1 -E %s | grep '^c: foo(x)$'
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-1
// CHECK-1:a: x
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-2
// CHECK-2:b: x y, z,h
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-3
// CHECK-3:c: foo(x)

#define A(b, c...) b c
a: A(x)
Expand Down
3 changes: 2 additions & 1 deletion clang/test/Preprocessor/macro_not_define.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -E %s | grep '^ # define X 3$'
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace
// CHECK: # define X 3

#define H #
#define D define
Expand Down
3 changes: 2 additions & 1 deletion clang/test/Preprocessor/macro_rparen_scan.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -E %s | grep '^3 ;$'
// RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace
// CHECK:3 ;

/* Right paren scanning, hard case. Should expand to 3. */
#define i(x) 3
Expand Down

0 comments on commit 904a3e5

Please sign in to comment.