Skip to content

Commit 2272726

Browse files
Reapply "[Clang] Make rewrite-includes-bom.c work with internal shell"
This reverts commit 354ad55. This was reverted previously for causing test failures on MacOS. It turns out that od -t x1 prints two spaces between hexadecimal representations of bytes rather than one like on other *nix systems. This reland updates the original patch to match any number of whitespace characters in between the bytes rather than just a single space.
1 parent 63ca2fd commit 2272726

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// RUN: grep -q $'^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h
1+
// RUN: cat %S/Inputs/rewrite-includes-bom.h | od -t x1 | grep -q 'ef\s*bb\s*bf'
22
// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o %t.c
3-
// RUN: ! grep -q $'\xEF\xBB\xBF' %t.c
3+
// RUN: cat %t.c | od -t x1 | not grep -q 'ef\s*bb\s*bf'
44
// RUN: %clang_cc1 -fsyntax-only -verify %t.c
55
// expected-no-diagnostics
6-
// REQUIRES: shell
76

87
#include "rewrite-includes-bom.h"

0 commit comments

Comments
 (0)