[totem-pl-parser] Add start-time test case
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] Add start-time test case
- Date: Mon, 4 Oct 2010 14:35:47 +0000 (UTC)
commit 6af36cd4a0add987f97ab822919eb58a5fe89c0c
Author: Bastien Nocera <hadess hadess net>
Date: Mon Oct 4 15:12:03 2010 +0100
Add start-time test case
From https://bugzilla.gnome.org/show_bug.cgi?id=624644
plparse/tests/Makefile.am | 3 ++-
plparse/tests/big5.smi | 14 ++++++++++++++
plparse/tests/parser.c | 10 ++++++++++
3 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/plparse/tests/Makefile.am b/plparse/tests/Makefile.am
index d79851c..4617b58 100644
--- a/plparse/tests/Makefile.am
+++ b/plparse/tests/Makefile.am
@@ -62,4 +62,5 @@ EXTRA_DIST = \
separator.m3u \
3gpp-file.mp4 \
really-flv.mp4 \
- audio.php
+ audio.php \
+ big5.smi
diff --git a/plparse/tests/big5.smi b/plparse/tests/big5.smi
new file mode 100644
index 0000000..ec845e8
--- /dev/null
+++ b/plparse/tests/big5.smi
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="big5" ?>
+<smil>
+ <head>
+ <meta name="title" content="Á¿ªFÁ¿¦è (¬P´Á¤ ¦Ü¤) " />
+ <meta name="author" content="RTHK ON INTERNET" />
+ <meta name="copyright" content="Radio Television Hong Kong" />
+ </head>
+ <body>
+ <seq>
+ <audio title="Á¿ªFÁ¿¦è (¬P´Á¤ ¦Ü¤) " src="rtsp://59.188.18.228/rthk/201007/radio1/12/2010071223.ra" clip-begin="00:04:00" clip-end="00:59:58"/>
+ <audio title="Á¿ªFÁ¿¦è (¬P´Á¤ ¦Ü¤) " src="rtsp://59.188.18.228/rthk/201007/radio1/13/2010071300.ra" clip-begin="00:05:00" clip-end="00:59:58"/>
+ </seq>
+ </body>
+</smil>
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index acd3046..58b4da3 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -452,6 +452,15 @@ test_parsing_xspf_genre (void)
}
static void
+test_smi_starttime (void)
+{
+ char *uri;
+ uri = get_relative_uri (TEST_SRCDIR "big5.smi");
+ g_assert_cmpstr (parser_test_get_entry_field (uri, TOTEM_PL_PARSER_FIELD_STARTTIME), ==, "00:04:00");
+ g_free (uri);
+}
+
+static void
test_parsing_rtsp_text_multi (void)
{
char *uri;
@@ -802,6 +811,7 @@ main (int argc, char *argv[])
g_test_add_func ("/parser/parsing/itms_link", test_itms_parsing);
g_test_add_func ("/parser/parsing/lastfm-attributes", test_lastfm_parsing);
g_test_add_func ("/parser/parsing/m3u_separator", test_m3u_separator);
+ g_test_add_func ("/parser/parsing/smi_starttime", test_smi_starttime);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]