20 TEST(CLParserTest, ShowIncludes) {
26 "c:\\Some Files\\foobar.h",
""));
29 "c:\\initspaces.h",
""));
33 "Non-default prefix: inc file:"));
36 TEST(CLParserTest, FilterInputFilename) {
43 "src\\cl_helper.cc(166) : fatal error C1075: end " 44 "of file found ..."));
47 TEST(CLParserTest, ParseSimple) {
52 "Note: inc file prefix: foo.h\r\n" 54 "Note: inc file prefix:", &output, &err));
61 TEST(CLParserTest, ParseFilenameFilter) {
71 TEST(CLParserTest, ParseSystemInclude) {
75 "Note: including file: c:\\Program Files\\foo.h\r\n" 76 "Note: including file: d:\\Microsoft Visual Studio\\bar.h\r\n" 77 "Note: including file: path.h\r\n",
86 TEST(CLParserTest, DuplicatedHeader) {
90 "Note: including file: foo.h\r\n" 91 "Note: including file: bar.h\r\n" 92 "Note: including file: foo.h\r\n",
99 TEST(CLParserTest, DuplicatedHeaderPathConverted) {
105 const char kInput[] =
106 "Note: including file: sub/./foo.h\r\n" 107 "Note: including file: bar.h\r\n" 109 "Note: including file: sub\\foo.h\r\n";
111 "Note: including file: sub/foo.h\r\n";
static bool FilterInputFilename(string line)
Parse a line of cl.exe output and return true if it looks like it's printing an input filename...
static string FilterShowIncludes(const string &line, const string &deps_prefix)
Parse a line of cl.exe output and extract /showIncludes info.
TEST(CLParserTest, ShowIncludes)
Visual Studio's cl.exe requires some massaging to work with Ninja; for example, it emits include info...
bool Parse(const string &output, const string &deps_prefix, string *filtered_output, string *err)
Parse the full output of cl, filling filtered_output with the text that should be printed (if any)...