summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
-rw-r--r--llvm/unittests/Support/VirtualFileSystemTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/unittests/Support/VirtualFileSystemTest.cpp b/llvm/unittests/Support/VirtualFileSystemTest.cpp
index d5c01141bba..466cd117a50 100644
--- a/llvm/unittests/Support/VirtualFileSystemTest.cpp
+++ b/llvm/unittests/Support/VirtualFileSystemTest.cpp
@@ -885,6 +885,17 @@ TEST_F(InMemoryFileSystemTest, WorkingDirectory) {
getPosixPath(NormalizedFS.getCurrentWorkingDirectory().get()));
}
+TEST_F(InMemoryFileSystemTest, IsLocal) {
+ FS.setCurrentWorkingDirectory("/b");
+ FS.addFile("c", 0, MemoryBuffer::getMemBuffer(""));
+
+ std::error_code EC;
+ bool IsLocal = true;
+ EC = FS.isLocal("c", IsLocal);
+ ASSERT_FALSE(EC);
+ ASSERT_FALSE(IsLocal);
+}
+
#if !defined(_WIN32)
TEST_F(InMemoryFileSystemTest, GetRealPath) {
SmallString<16> Path;
OpenPOWER on IntegriCloud