summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Lex/HeaderSearchTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Lex/HeaderSearchTest.cpp')
-rw-r--r--clang/unittests/Lex/HeaderSearchTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/Lex/HeaderSearchTest.cpp b/clang/unittests/Lex/HeaderSearchTest.cpp
index 6365d3ed057..b5b0f9a833c 100644
--- a/clang/unittests/Lex/HeaderSearchTest.cpp
+++ b/clang/unittests/Lex/HeaderSearchTest.cpp
@@ -91,5 +91,14 @@ TEST_F(HeaderSearchTest, Dots) {
"z");
}
+#ifdef _WIN32
+TEST_F(HeaderSearchTest, BackSlash) {
+ addSearchDir("C:\\x\\y\\");
+ EXPECT_EQ(Search.suggestPathToFileForDiagnostics("C:\\x\\y\\z\\t",
+ /*WorkingDir=*/""),
+ "z/t");
+}
+#endif
+
} // namespace
} // namespace clang
OpenPOWER on IntegriCloud