diff options
author | Dan Winship <danw@gnome.org> | 2013-12-11 18:15:13 +0100 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-08 13:20:21 +0100 |
commit | 094eee8d1e0ac31e83f45e026ef26688e1468884 (patch) | |
tree | f5aa4dc398c5117ca5e3392794811fd39c048f22 /tests/test-utils.h | |
parent | 64e667bda5009c8f1acd03659c457e26b16457a6 (diff) | |
download | libsoup-094eee8d1e0ac31e83f45e026ef26688e1468884.tar.gz |
tests: Add resources/* to soup-test.gresource, add utility functions
Add the files in resources/ to soup-test.gresource, and add
soup_test_load_resource() to get the contents of one of them, and then
use this in places that were previously reading them by hand.
Except forms-test, which needs to pass a filename to curl, so have it
use index.txt instead of one of the resource files.
Now none of the tests access the resources/ directory at runtime.
Also add soup_test_get_index() to read index.txt rather than
reimplementing it in multiple test programs.
Diffstat (limited to 'tests/test-utils.h')
-rw-r--r-- | tests/test-utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-utils.h b/tests/test-utils.h index 97741516..315d1117 100644 --- a/tests/test-utils.h +++ b/tests/test-utils.h @@ -54,6 +54,12 @@ gboolean soup_test_request_close_stream (SoupRequest *req, GCancellable *cancellable, GError **error); +void soup_test_register_resources (void); +SoupBuffer *soup_test_load_resource (const char *name, + GError **error); + +SoupBuffer *soup_test_get_index (void); + #ifdef G_HAVE_ISO_VARARGS #define soup_test_assert(expr, ...) \ G_STMT_START { \ |