]> granicus.if.org Git - clang/commitdiff
Improve BOM test from r195877
authorAlp Toker <alp@nuanti.com>
Wed, 27 Nov 2013 22:54:04 +0000 (22:54 +0000)
committerAlp Toker <alp@nuanti.com>
Wed, 27 Nov 2013 22:54:04 +0000 (22:54 +0000)
 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

test/Frontend/rewrite-includes-bom.c

index a1aa4c98f86ed1d096417d4f99ddde72d8edd568..276c994fb0e7e4efd0c025f7b543e4012d7b6b65 100644 (file)
@@ -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"