r195886 - Improve BOM test from r195877

Alp Toker alp at nuanti.com
Wed Nov 27 14:54:04 PST 2013


Author: alp
Date: Wed Nov 27 16:54:04 2013
New Revision: 195886

URL: http://llvm.org/viewvc/llvm-project?rev=195886&view=rev
Log:
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

Modified:
    cfe/trunk/test/Frontend/rewrite-includes-bom.c

Modified: cfe/trunk/test/Frontend/rewrite-includes-bom.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/rewrite-includes-bom.c?rev=195886&r1=195885&r2=195886&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/rewrite-includes-bom.c (original)
+++ cfe/trunk/test/Frontend/rewrite-includes-bom.c Wed Nov 27 16:54:04 2013
@@ -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"





More information about the cfe-commits mailing list