From: Alp Toker Date: Wed, 27 Nov 2013 22:54:04 +0000 (+0000) Subject: Improve BOM test from r195877 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94ada1be3db0c968c4948074ee38144d98389e71;p=clang Improve BOM test from r195877 1) Use %clang_cc1 instead of the driver 2) Validate that the input contains a BOM 3) Validate that the BOM has been stripped from the output git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195886 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Frontend/rewrite-includes-bom.c b/test/Frontend/rewrite-includes-bom.c index a1aa4c98f8..276c994fb0 100644 --- a/test/Frontend/rewrite-includes-bom.c +++ b/test/Frontend/rewrite-includes-bom.c @@ -1,4 +1,5 @@ -// RUN: %clang -E -frewrite-includes -I %S/Inputs %s -o - | %clang -fsyntax-only -Xclang -verify -x c - +// RUN: grep '^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h +// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o - | %clang_cc1 -fsyntax-only -verify -x c - | not grep '\xEF\xBB\xBF' // expected-no-diagnostics #include "rewrite-includes-bom.h"