Author: aganea Date: Fri May 10 13:11:36 2019 New Revision: 360467 URL: http://llvm.org/viewvc/llvm-project?rev=360467&view=rev Log: Fixed tests where grep was not matching the linefeed
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 Modified: cfe/trunk/test/Preprocessor/indent_macro.c cfe/trunk/test/Preprocessor/macro_fn_varargs_named.c cfe/trunk/test/Preprocessor/macro_not_define.c cfe/trunk/test/Preprocessor/macro_rparen_scan.c Modified: cfe/trunk/test/Preprocessor/indent_macro.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/indent_macro.c?rev=360467&r1=360466&r2=360467&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/indent_macro.c (original) +++ cfe/trunk/test/Preprocessor/indent_macro.c Fri May 10 13:11:36 2019 @@ -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 Modified: cfe/trunk/test/Preprocessor/macro_fn_varargs_named.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_fn_varargs_named.c?rev=360467&r1=360466&r2=360467&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/macro_fn_varargs_named.c (original) +++ cfe/trunk/test/Preprocessor/macro_fn_varargs_named.c Fri May 10 13:11:36 2019 @@ -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) Modified: cfe/trunk/test/Preprocessor/macro_not_define.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_not_define.c?rev=360467&r1=360466&r2=360467&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/macro_not_define.c (original) +++ cfe/trunk/test/Preprocessor/macro_not_define.c Fri May 10 13:11:36 2019 @@ -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 Modified: cfe/trunk/test/Preprocessor/macro_rparen_scan.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_rparen_scan.c?rev=360467&r1=360466&r2=360467&view=diff ============================================================================== --- cfe/trunk/test/Preprocessor/macro_rparen_scan.c (original) +++ cfe/trunk/test/Preprocessor/macro_rparen_scan.c Fri May 10 13:11:36 2019 @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits