diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.cvsignore | 1 | ||||
-rw-r--r-- | tests/test-filesys.c | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/.cvsignore b/tests/.cvsignore index 402f8a866..5c12492f1 100644 --- a/tests/.cvsignore +++ b/tests/.cvsignore @@ -1,6 +1,7 @@ Makefile.in Makefile test-gphoto2 +test-filesys .libs .deps *.o diff --git a/tests/test-filesys.c b/tests/test-filesys.c index beaf39c40..d25050642 100644 --- a/tests/test-filesys.c +++ b/tests/test-filesys.c @@ -16,6 +16,21 @@ main (int argc, char **argv) printf ("*** Creating file system...\n"); fs = gp_filesystem_new (); + printf ("*** Adding a file...\n"); + CHECK (gp_filesystem_append (fs, "/", "my.file")); + + gp_filesystem_dump (fs); + + printf ("*** Removing this file...\n"); + CHECK (gp_filesystem_delete (fs, "/", "my.file")); + + gp_filesystem_dump (fs); + + printf ("*** Removing /...\n"); + CHECK (gp_filesystem_delete (fs, "/", NULL)); + + gp_filesystem_dump (fs); + printf ("*** Adding some files...\n"); CHECK (gp_filesystem_append (fs, "/", NULL)); CHECK (gp_filesystem_append (fs, "/whatever", NULL)); |