Add initial support for looking up file by path
This commit is contained in:
@@ -32,3 +32,6 @@ add_test("Test\\ PathIterator1" FSTests PathIterator1)
|
||||
add_test("Test\\ PathIterator2" FSTests PathIterator2)
|
||||
add_test("Test\\ PathIterator3" FSTests PathIterator3)
|
||||
add_test("Test\\ PathIterator4" FSTests PathIterator4)
|
||||
add_test("Test\\ PathIterator5" FSTests PathIterator5)
|
||||
|
||||
add_test("Test\\ FileSystem32::findInodeOf" FSTests FileSystem32::findInodeOf)
|
||||
|
||||
@@ -90,6 +90,19 @@ map<string, int(*)(string)> tests = {
|
||||
return retval;
|
||||
}
|
||||
},
|
||||
{
|
||||
"FileSystem32::findInodeOf",
|
||||
[](string) {
|
||||
int retval = 0;
|
||||
const auto size = 1024;
|
||||
uint8_t buff[size];
|
||||
FileSystem32::format(buff, (FileStore32::FsSize_t) size, true);
|
||||
auto fs = (FileSystem32*) createFileSystem(buff, size);
|
||||
retval |= !(fs->findInodeOf("/") == FileSystem32::INODE_ROOT_DIR);
|
||||
delete fs;
|
||||
return retval;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user