diff options
author | Martyn Russell <martyn@lanedo.com> | 2014-09-16 10:05:13 +0100 |
---|---|---|
committer | Martyn Russell <martyn@lanedo.com> | 2014-10-17 12:01:32 +0100 |
commit | 88c961d19f2621572a22ec9c170ad33eac2900c9 (patch) | |
tree | 20c0df36200d1859ff429b0fc5e438c7b991267d /tests/mediaarttest.c | |
parent | d5c0a9ac46eaa10e54518907ff63c9c60d57b2fe (diff) | |
download | libmediaart-88c961d19f2621572a22ec9c170ad33eac2900c9.tar.gz |
extract, cache: Remove all .mediaartlocal usesremove-mediaartlocal
This is deemed quite useless now and we should not be littering the file
system with .mediaartlocal directories everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=722795
Diffstat (limited to 'tests/mediaarttest.c')
-rw-r--r-- | tests/mediaarttest.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/tests/mediaarttest.c b/tests/mediaarttest.c index fb03d6a..ff22991 100644 --- a/tests/mediaarttest.c +++ b/tests/mediaarttest.c @@ -131,15 +131,13 @@ static void test_mediaart_location (TestInfo *test_info, gconstpointer context) { - gchar *path = NULL, *local_uri = NULL; + gchar *path = NULL; gchar *expected; media_art_get_path (test_info->input1, test_info->input2, "album", - "file:///home/test/a.mp3", - &path, - &local_uri); + &path); expected = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (), "media-art", @@ -149,37 +147,32 @@ test_mediaart_location (TestInfo *test_info, g_free (expected); g_free (path); - g_free (local_uri); } static void test_mediaart_location_null (void) { - gchar *path = NULL, *local_uri = NULL; + gchar *path = NULL; - /* NULL parameters */ - media_art_get_path (NULL, "some-title", "album", "file:///a/b/c.mp3", &path, &local_uri); - g_assert (path != NULL); - g_assert (local_uri != NULL); + /* NULL parameters */ + media_art_get_path (NULL, "some-title", "album", &path); + g_assert (path != NULL); - media_art_get_path ("some-artist", NULL, "album", "file:///a/b/c.mp3", &path, &local_uri); - g_assert (path != NULL); - g_assert (local_uri != NULL); + media_art_get_path ("some-artist", NULL, "album", &path); + g_assert (path != NULL); } static void test_mediaart_location_path (void) { - gchar *path = NULL, *local_uri = NULL; + gchar *path = NULL; gchar *expected; /* Use path instead of URI */ media_art_get_path (location_test_cases[0].input1, location_test_cases[0].input2, "album", - "/home/test/a.mp3", - &path, - &local_uri); + &path); expected = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (), "media-art", @@ -189,7 +182,6 @@ test_mediaart_location_path (void) g_free (expected); g_free (path); - g_free (local_uri); } static void @@ -329,9 +321,7 @@ test_mediaart_process_buffer_cb (GObject *source_object, media_art_get_path ("Lanedo", /* artist / title */ NULL, /* album */ NULL, /* prefix */ - path, - &out_path, - &out_uri); + &out_path); g_free (path); g_object_unref (file); @@ -365,7 +355,6 @@ test_mediaart_process_buffer (void) gchar *dir; gchar *path; gchar *out_path = NULL; - gchar *out_uri = NULL; unsigned char *buffer = NULL; size_t length = 0; const gchar *mime; @@ -378,12 +367,9 @@ test_mediaart_process_buffer (void) media_art_get_path ("Lanedo", /* artist / title */ NULL, /* album */ NULL, /* prefix */ - path, - &out_path, - &out_uri); + &out_path); g_assert_false (g_file_test (out_path, G_FILE_TEST_EXISTS)); g_free (out_path); - g_free (out_uri); /* Creates media-art cache dir if it doesn't exist ... */ process = media_art_process_new (&error); |