[PATCH] D61496: Fixed tests where grep was not matching the linefeed
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 10 13:10:25 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rC360467: Fixed tests where grep was not matching the linefeed (authored by aganea, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D61496?vs=197990&id=199069#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61496/new/
https://reviews.llvm.org/D61496
Files:
test/Preprocessor/indent_macro.c
test/Preprocessor/macro_fn_varargs_named.c
test/Preprocessor/macro_not_define.c
test/Preprocessor/macro_rparen_scan.c
Index: test/Preprocessor/macro_rparen_scan.c
===================================================================
--- test/Preprocessor/macro_rparen_scan.c
+++ 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
Index: test/Preprocessor/macro_fn_varargs_named.c
===================================================================
--- test/Preprocessor/macro_fn_varargs_named.c
+++ 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)
Index: test/Preprocessor/macro_not_define.c
===================================================================
--- test/Preprocessor/macro_not_define.c
+++ 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
Index: test/Preprocessor/indent_macro.c
===================================================================
--- test/Preprocessor/indent_macro.c
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61496.199069.patch
Type: text/x-patch
Size: 2012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190510/add1f0a2/attachment.bin>
More information about the cfe-commits
mailing list