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



commit af13421e30dd30fc4adc2e8740564e9413f7c2cc
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 2 14:56:02 2011 +0000

    Add test for bug 643667

 plparse/tests/Makefile.am       |    1 +
 plparse/tests/emptyplaylist.pls |    1 +
 plparse/tests/parser.c          |   10 ++++++++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plparse/tests/Makefile.am b/plparse/tests/Makefile.am
index 5368b83..8b14df7 100644
--- a/plparse/tests/Makefile.am
+++ b/plparse/tests/Makefile.am
@@ -66,4 +66,5 @@ EXTRA_DIST =			\
 	big5.smi		\
 	O_G_Money_Snoop_Dogg.m3u \
 	empty-asx.asx		\
+	emptyplaylist.pls	\
 	WMA9.1_98_quality_48khz_vbr_s.wma
diff --git a/plparse/tests/emptyplaylist.pls b/plparse/tests/emptyplaylist.pls
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/plparse/tests/emptyplaylist.pls
@@ -0,0 +1 @@
+
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index ec0ab5d..05b4996 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -532,6 +532,15 @@ test_empty_asx (void)
 }
 
 static void
+test_empty_pls (void)
+{
+	char *uri;
+	uri = get_relative_uri (TEST_SRCDIR "emptyplaylist.pls");
+	g_assert (simple_parser_test (uri) == TOTEM_PL_PARSER_RESULT_UNHANDLED);
+	g_free (uri);
+}
+
+static void
 test_parsing_rtsp_text_multi (void)
 {
 	char *uri;
@@ -965,6 +974,7 @@ main (int argc, char *argv[])
 		g_test_add_func ("/parser/parsing/smi_starttime", test_smi_starttime);
 		g_test_add_func ("/parser/parsing/m3u_leading_tabs", test_m3u_leading_tabs);
 		g_test_add_func ("/parser/parsing/empty-asx.asx", test_empty_asx);
+		g_test_add_func ("/parser/parsing/emptyplaylist.pls", test_empty_pls);
 		g_test_add_func ("/parser/parsing/dir_recurse", test_directory_recurse);
 		g_test_add_func ("/parser/parsing/async_signal_order", test_async_parsing_signal_order);
 		g_test_add_func ("/parser/parsing/wma_asf", test_parsing_wma_asf);



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