EXPECT_FALSE(FS.get() != nullptr);
}
+TEST_F(VFSFromYAMLTest, YAMLVFSWriterTest3) {
+ ScopedDir TestDirectory("virtual-file-system-test", /*Unique*/ true);
+ ScopedDir _a(TestDirectory + "/a");
+ ScopedFile _ab(TestDirectory + "/a/b", "");
+ ScopedDir _ac(TestDirectory + "/a/c");
+ ScopedDir _acd(TestDirectory + "/a/c/d");
+ ScopedDir _acde(TestDirectory + "/a/c/d/e");
+ ScopedFile _acdef(TestDirectory + "/a/c/d/e/f", "");
+ ScopedFile _acdeg(TestDirectory + "/a/c/d/e/g", "");
+ ScopedDir _ah(TestDirectory + "/a/h");
+ ScopedFile _ahi(TestDirectory + "/a/h/i", "");
+
+ vfs::YAMLVFSWriter VFSWriter;
+ VFSWriter.addDirectoryMapping(_a.Path, "//root/a");
+ VFSWriter.addFileMapping(_ab.Path, "//root/a/b");
+ VFSWriter.addDirectoryMapping(_ac.Path, "//root/a/c");
+ VFSWriter.addDirectoryMapping(_acd.Path, "//root/a/c/d");
+ VFSWriter.addDirectoryMapping(_acde.Path, "//root/a/c/d/e");
+ VFSWriter.addFileMapping(_acdef.Path, "//root/a/c/d/e/f");
+ VFSWriter.addFileMapping(_acdeg.Path, "//root/a/c/d/e/g");
+ VFSWriter.addDirectoryMapping(_ahi.Path, "//root/a/h");
+ VFSWriter.addFileMapping(_ahi.Path, "//root/a/h/i");
+
+ std::string Buffer;
+ raw_string_ostream OS(Buffer);
+ VFSWriter.write(OS);
+ OS.flush();
+
+ IntrusiveRefCntPtr<ErrorDummyFileSystem> Lower(new ErrorDummyFileSystem());
+ IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLRawString(Buffer, Lower);
+ // FIXME: Spurious comma separator before first file entry in directory.
+ EXPECT_FALSE(FS.get() != nullptr);
+}
+
TEST_F(VFSFromYAMLTest, YAMLVFSWriterTestHandleDirs) {
ScopedDir TestDirectory("virtual-file-system-test", /*Unique*/ true);
ScopedDir _a(TestDirectory + "/a");