summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-04-24 02:11:28 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-04-24 02:11:28 +0100
commit0ff1b18cbb105f33b5d9682cda23f2c389d75d3f (patch)
tree13d57ed1ae644464417e9a2a45f5df0688d56b3f
parenta85d7b7059d1955666fe0b93f5dcacdc3e02426b (diff)
id3demux: add unit test file for unsynced id3 tags
-rw-r--r--tests/check/elements/id3demux.c31
-rw-r--r--tests/files/id3-577468-unsynced-tag.tagbin0 -> 11264 bytes
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/check/elements/id3demux.c b/tests/check/elements/id3demux.c
index 96aafdcb8..a3eb77b45 100644
--- a/tests/check/elements/id3demux.c
+++ b/tests/check/elements/id3demux.c
@@ -201,6 +201,36 @@ GST_START_TEST (test_wcop)
GST_END_TEST;
+static void
+check_unsync (const GstTagList * tags, const gchar * file)
+{
+ gchar *album = NULL;
+ gchar *title = NULL;
+ gchar *artist = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_TITLE, &title));
+ fail_unless (title != NULL);
+ fail_unless_equals_string (title, "ARTIST"); /* sic */
+ g_free (title);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &album));
+ fail_unless (album != NULL);
+ fail_unless_equals_string (album, "Album");
+ g_free (album);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &artist));
+ fail_unless (artist != NULL);
+ fail_unless_equals_string (artist, "藝人");
+ g_free (artist);
+}
+
+GST_START_TEST (test_unsync)
+{
+ run_check_for_file ("id3-577468-unsynced-tag.tag", check_unsync);
+}
+
+GST_END_TEST;
+
static Suite *
id3demux_suite (void)
{
@@ -210,6 +240,7 @@ id3demux_suite (void)
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_tdat_tyer);
tcase_add_test (tc_chain, test_wcop);
+ tcase_add_test (tc_chain, test_unsync);
return s;
}
diff --git a/tests/files/id3-577468-unsynced-tag.tag b/tests/files/id3-577468-unsynced-tag.tag
new file mode 100644
index 000000000..a5880e848
--- /dev/null
+++ b/tests/files/id3-577468-unsynced-tag.tag
Binary files differ