// RUN: %clang -E -frewrite-includes -I %S/Inputs %s -o - | %clang -fsyntax-only -Xclang -verify -x c -
// expected-no-diagnostics

#include "rewrite-includes-bom.h"

// 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"

Improve BOM test from r195877
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: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@195886 91177308-0d34-0410-b5e6-96231b3b80d8
