summaryrefslogtreecommitdiffstats
path: root/src/msvc_helper_test.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-08-12 23:29:43 (GMT)
committerEvan Martin <martine@danga.com>2012-08-12 23:29:43 (GMT)
commit449b62075c81431c58ab9fef0054d61513d9d656 (patch)
tree2fba32069a42caa65a8d00112ea461a7d129a5fe /src/msvc_helper_test.cc
parentde3f570cfe0bfdd564913a1431dc95fd17ff44eb (diff)
downloadNinja-449b62075c81431c58ab9fef0054d61513d9d656.zip
Ninja-449b62075c81431c58ab9fef0054d61513d9d656.tar.gz
Ninja-449b62075c81431c58ab9fef0054d61513d9d656.tar.bz2
msvc helper: drop system includes
Drop any #includes that look like they're referencing system headers. This reduces the dependency information considerably.
Diffstat (limited to 'src/msvc_helper_test.cc')
-rw-r--r--src/msvc_helper_test.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/msvc_helper_test.cc b/src/msvc_helper_test.cc
index a0bab90..b65d66f 100644
--- a/src/msvc_helper_test.cc
+++ b/src/msvc_helper_test.cc
@@ -58,3 +58,17 @@ TEST(MSVCHelperTest, RunFilenameFilter) {
&output);
ASSERT_EQ("cl: warning\n", output);
}
+
+TEST(MSVCHelperTest, RunSystemInclude) {
+ CLWrapper cl;
+ string output;
+ cl.Run("cmd /c \"echo Note: including file: c:\\Program Files\\foo.h&&"
+ "echo Note: including file: d:\\Microsoft Visual Studio\\bar.h&&"
+ "echo Note: including file: path.h\"",
+ &output);
+ // We should have dropped the first two includes because they look like
+ // system headers.
+ ASSERT_EQ("", output);
+ ASSERT_EQ(1u, cl.includes_.size());
+ ASSERT_EQ("path.h", cl.includes_[0]);
+}