Added a mocked filesystem to simulate a real filesystem in tests.

This commit is contained in:
Vreixo Formoso
2007-12-07 17:29:27 +01:00
parent 45f4d0a29e
commit 7d417e9fa6
4 changed files with 523 additions and 2 deletions

23
test/mocked_fsrc.h Normal file
View 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_*/