diff options
author | Alexandru Fazakas <alex.fazakas97@gmail.com> | 2018-07-20 12:57:25 +0300 |
---|---|---|
committer | Alexandru Fazakas <alex.fazakas97@gmail.com> | 2018-07-20 12:57:25 +0300 |
commit | 1be08bd3a051182ceb5288f808794601b542e94a (patch) | |
tree | a40aa19c6699e9c897eaebd80f797a24e2775d03 | |
parent | 544c1cca5692c5dc81a14ce8176b197f671c966c (diff) | |
download | nautilus-1be08bd3a051182ceb5288f808794601b542e94a.tar.gz |
test: dir-has-files: Clean up files
We should clean up files/directories after using them for testing.
This patch deletes all create files after using them for the dir-has-files
test.
-rw-r--r-- | test/automated/displayless/test-file-operations-dir-has-files.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/automated/displayless/test-file-operations-dir-has-files.c b/test/automated/displayless/test-file-operations-dir-has-files.c index 10bbaa663..f5a7f1dcc 100644 --- a/test/automated/displayless/test-file-operations-dir-has-files.c +++ b/test/automated/displayless/test-file-operations-dir-has-files.c @@ -19,6 +19,7 @@ test_simple_file (void) file = g_file_get_child (root, "simple_file"); g_file_create (file, G_FILE_CREATE_NONE, NULL, NULL); g_assert_false (dir_has_files (file)); + g_assert_true (g_file_delete (file, NULL, NULL)); } /* Tests the function for an empty directory */ @@ -36,6 +37,7 @@ test_empty_directory (void) g_file_make_directory (child, NULL, NULL); g_assert_false (dir_has_files (child)); + g_assert_true (g_file_delete (child, NULL, NULL)); } /* Tests the function for a directory containing one directory */ @@ -56,6 +58,8 @@ test_directory_one_file (void) g_file_make_directory (child_file, NULL, NULL); g_assert_true (dir_has_files (parent_dir)); + g_assert_true (g_file_delete (child_file, NULL, NULL)); + g_assert_true (g_file_delete (parent_dir, NULL, NULL)); } static void |