Adding files and printing works mostly, issue with first directory not solved
This commit is contained in:
+12
-1
@@ -3,7 +3,9 @@
|
||||
#include <unistd.h>
|
||||
#include "unity/unity.h"
|
||||
#include "fuse.h"
|
||||
#include "fuseactions.h"
|
||||
#include "fsactions.h"
|
||||
#include "fsinterface.h"
|
||||
#include "fusestructs.h"
|
||||
|
||||
FileSystem* fakefs;
|
||||
fuseArgStruct dummyFuse;
|
||||
@@ -63,6 +65,14 @@ void Test_FileSystem_Should_AddFile(void)
|
||||
GetArguments(argc, argv, &dummyFuse);
|
||||
RunFuse(fakefs, &dummyFuse);
|
||||
TEST_ASSERT_EQUAL(1, fakefs->inodes[1].isValid);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY("test1.txt", fakefs->inodes[2].blocks[0].name, 9);
|
||||
}
|
||||
|
||||
void Test_FileSystem_Should_ListContents(void)
|
||||
{
|
||||
Fuse(argc, argv);
|
||||
printf("%s\n", fakefs->inodes[0].blocks[0].name);
|
||||
TEST_IGNORE_MESSAGE("This only runs the list operation. Check info yourself.");
|
||||
}
|
||||
|
||||
int main(void)
|
||||
@@ -72,5 +82,6 @@ int main(void)
|
||||
RUN_TEST(Test_FindEmptyBitPosition_Should_ReturnPosition);
|
||||
RUN_TEST(Test_FileSystem_Should_SuccessfullyOpen);
|
||||
RUN_TEST(Test_FileSystem_Should_AddFile);
|
||||
RUN_TEST(Test_FileSystem_Should_ListContents);
|
||||
return UNITY_END();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user