summaryrefslogtreecommitdiff
path: root/tests/forms-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-12-11 18:15:13 +0100
committerDan Winship <danw@gnome.org>2013-12-11 18:15:13 +0100
commit1ef5769bf20fb3def1410928729e37c617d8d43e (patch)
treeba49f809b2525a4f815cea35fc4332cff865c041 /tests/forms-test.c
parent76390051d2f0635b4905d5599fdd200f046b26f0 (diff)
downloadlibsoup-1ef5769bf20fb3def1410928729e37c617d8d43e.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/forms-test.c')
-rw-r--r--tests/forms-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/forms-test.c b/tests/forms-test.c
index 8747e73e..8fd0de4a 100644
--- a/tests/forms-test.c
+++ b/tests/forms-test.c
@@ -131,9 +131,9 @@ do_md5_test_curl (const char *uri, const char *file, const char *md5)
g_free (file_arg);
}
-#define MD5_TEST_FILE SRCDIR "/resources/home.gif"
-#define MD5_TEST_FILE_BASENAME "home.gif"
-#define MD5_TEST_FILE_MIME_TYPE "image/gif"
+#define MD5_TEST_FILE SRCDIR "/index.txt"
+#define MD5_TEST_FILE_BASENAME "index.txt"
+#define MD5_TEST_FILE_MIME_TYPE "text/plain"
static void
do_md5_test_libsoup (const char *uri, const char *contents,