[totem-pl-parser] Add test for bug 594036



commit fe01f1bbcbbc67dbfe5d9b702314f3868c892bba
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Dec 4 14:24:55 2009 +0000

    Add test for bug 594036

 plparse/tests/live-streaming.m3u |    5 +++++
 plparse/tests/parser.c           |    9 +++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plparse/tests/live-streaming.m3u b/plparse/tests/live-streaming.m3u
new file mode 100644
index 0000000..c675e62
--- /dev/null
+++ b/plparse/tests/live-streaming.m3u
@@ -0,0 +1,5 @@
+#EXTM3U
+#EXT-X-TARGETDURATION:5220
+#EXTINF:5220,
+http://media.example.com/entire.ts
+#EXT-X-ENDLIST
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index 7a6e9fe..53ff4ad 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -326,6 +326,14 @@ test_parsing_xml_comment_whitespace (void)
 	g_assert (simple_parser_test ("file://" TEST_FILE_DIR "541405.xml") == TOTEM_PL_PARSER_RESULT_SUCCESS);
 }
 
+static void
+test_parsing_live_streaming (void)
+{
+	g_test_bug ("594036");
+	/* File from http://tools.ietf.org/html/draft-pantos-http-live-streaming-02#section-7.1 */
+	g_assert (simple_parser_test ("file://" TEST_FILE_DIR "live-streaming.m3u") == TOTEM_PL_PARSER_RESULT_UNHANDLED);
+}
+
 #define MAX_DESCRIPTION_LEN 128
 #define DATE_BUFSIZE 512
 #define PRINT_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ"
@@ -488,6 +496,7 @@ main (int argc, char *argv[])
 		g_test_add_func ("/parser/parsing/xml_comment_whitespace", test_parsing_xml_comment_whitespace);
 		g_test_add_func ("/parser/parsing/multi_line_rtsptext", test_parsing_rtsp_text_multi);
 		g_test_add_func ("/parser/parsing/single_line_rtsptext", test_parsing_rtsp_text);
+		g_test_add_func ("/parser/parsing/live_streaming", test_parsing_live_streaming);
 
 		return g_test_run ();
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]