summaryrefslogtreecommitdiff
path: root/egg
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2014-03-06 16:12:16 +0100
committerStef Walter <stefw@gnome.org>2014-03-06 18:40:24 +0100
commitf63d9c0972b821fa48f357e391e6ca2e00a400a1 (patch)
tree2fe19743a670bf7fd3e6105d6caa9cded1c2f845 /egg
parent924b7704010b2a61d93640b63b5089176c026fbf (diff)
downloadgnome-keyring-f63d9c0972b821fa48f357e391e6ca2e00a400a1.tar.gz
egg: Add egg_tests_copy_scratch_file() method for fixture files
Diffstat (limited to 'egg')
-rw-r--r--egg/egg-testing.c8
-rw-r--r--egg/egg-testing.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/egg/egg-testing.c b/egg/egg-testing.c
index 0fc72f8f..0db594ef 100644
--- a/egg/egg-testing.c
+++ b/egg/egg-testing.c
@@ -230,9 +230,9 @@ egg_tests_run_with_loop (void)
return ret;
}
-static void
-copy_scratch_file (const gchar *filename,
- const gchar *directory)
+void
+egg_tests_copy_scratch_file (const gchar *directory,
+ const gchar *filename)
{
GError *error = NULL;
gchar *basename;
@@ -273,7 +273,7 @@ egg_tests_create_scratch_directory (const gchar *file_to_copy,
va_start (va, file_to_copy);
while (file_to_copy != NULL) {
- copy_scratch_file (file_to_copy, directory);
+ egg_tests_copy_scratch_file (directory, file_to_copy);
file_to_copy = va_arg (va, const gchar *);
}
diff --git a/egg/egg-testing.h b/egg/egg-testing.h
index 402e667d..c51c7d00 100644
--- a/egg/egg-testing.h
+++ b/egg/egg-testing.h
@@ -59,6 +59,9 @@ gint egg_tests_run_with_loop (void);
gint egg_tests_run_in_thread_with_loop (void);
+void egg_tests_copy_scratch_file (const gchar *directory,
+ const gchar *file_to_copy);
+
gchar * egg_tests_create_scratch_directory (const gchar *file_to_copy,
...) G_GNUC_NULL_TERMINATED;