summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
-rw-r--r--clang/unittests/Basic/VirtualFileSystemTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp
index ac07035d3e1..b72b757b5ff 100644
--- a/clang/unittests/Basic/VirtualFileSystemTest.cpp
+++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp
@@ -657,6 +657,12 @@ TEST_F(InMemoryFileSystemTest, WorkingDirectory) {
Stat = FS.status("c");
ASSERT_FALSE(Stat.getError()) << Stat.getError() << "\n" << FS.toString();
+
+ NormalizedFS.setCurrentWorkingDirectory("/b/c");
+ NormalizedFS.setCurrentWorkingDirectory(".");
+ ASSERT_EQ("/b/c", NormalizedFS.getCurrentWorkingDirectory().get());
+ NormalizedFS.setCurrentWorkingDirectory("..");
+ ASSERT_EQ("/b", NormalizedFS.getCurrentWorkingDirectory().get());
}
// NOTE: in the tests below, we use '//root/' as our root directory, since it is
OpenPOWER on IntegriCloud