Added a mocked filesystem to simulate a real filesystem in tests.
This commit is contained in:
23
test/mocked_fsrc.h
Normal file
23
test/mocked_fsrc.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Mocked objects to simulate an input filesystem.
|
||||
*/
|
||||
|
||||
#ifndef MOCKED_FSRC_H_
|
||||
#define MOCKED_FSRC_H_
|
||||
|
||||
/**
|
||||
* A mocked fs with a registry of files, that you can add via
|
||||
* test_mocked_fs_add_fsrc().
|
||||
*/
|
||||
int test_mocked_filesystem_new(IsoFilesystem **fs);
|
||||
|
||||
int test_mocked_fs_add_file(IsoFilesystem *fs, const char *path,
|
||||
struct stat info);
|
||||
|
||||
int test_mocked_fs_add_dir(IsoFilesystem *fs, const char *path,
|
||||
struct stat info);
|
||||
|
||||
int test_mocked_fs_add_symlink(IsoFilesystem *fs, const char *path,
|
||||
struct stat info, const char *dest);
|
||||
|
||||
#endif /*MOCKED_FSRC_H_*/
|
Reference in New Issue
Block a user