diff options
author | Jason Kivlighn <jkivlighn@gmail.com> | 2007-10-11 17:55:29 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2007-10-11 17:55:29 +0000 |
commit | 4faf179db82b6c51158bf6a65da0ecca82fa6c60 (patch) | |
tree | 77c35a31c8ffb4480988cd6a0b0023f52d8816bc /tests/check | |
parent | a16be6f13a90c31c01f41aa524748a5454a617bf (diff) |
gst/id3demux/id3v2frames.c: Extract license/copyright URIs from ID3v2 WCOP frames (Fixes #447000).
Original commit message from CVS:
Based on patch by: Jason Kivlighn <jkivlighn gmail com>
* gst/id3demux/id3v2frames.c:
Extract license/copyright URIs from ID3v2 WCOP frames
(Fixes #447000).
* tests/check/elements/id3demux.c:
* tests/files/Makefile.am:
* tests/files/id3-447000-wcop.tag:
Add simple unit test.
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/elements/id3demux.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/check/elements/id3demux.c b/tests/check/elements/id3demux.c index d0f385d9..96aafdcb 100644 --- a/tests/check/elements/id3demux.c +++ b/tests/check/elements/id3demux.c @@ -175,6 +175,32 @@ GST_START_TEST (test_tdat_tyer) GST_END_TEST; +static void +check_wcop (const GstTagList * tags, const gchar * file) +{ + gchar *copyright = NULL; + gchar *uri = NULL; + + fail_unless (gst_tag_list_get_string (tags, GST_TAG_LICENSE_URI, &uri)); + fail_unless (uri != NULL); + fail_unless_equals_string (uri, + "http://creativecommons.org/licenses/by/3.0/"); + g_free (uri); + + fail_unless (gst_tag_list_get_string (tags, GST_TAG_COPYRIGHT, ©right)); + fail_unless (copyright != NULL); + fail_unless_equals_string (copyright, + " Steadman. Licensed to the public under http://creativecommons.org/licenses/by/3.0/ verify at http://test.com"); + g_free (copyright); +} + +GST_START_TEST (test_wcop) +{ + run_check_for_file ("id3-447000-wcop.tag", check_wcop); +} + +GST_END_TEST; + static Suite * id3demux_suite (void) { @@ -183,6 +209,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); return s; } |