[totem-pl-parser] Add empty ASX file test case



commit df96a5635643be596b18a42f2aeec5bd0af45711
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 8 11:16:29 2010 +0100

    Add empty ASX file test case
    
    To clean up my home directory

 plparse/tests/Makefile.am   |    3 ++-
 plparse/tests/empty-asx.asx |    8 ++++++++
 plparse/tests/parser.c      |   10 ++++++++++
 3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/plparse/tests/Makefile.am b/plparse/tests/Makefile.am
index 68f7c69..f63ed1b 100644
--- a/plparse/tests/Makefile.am
+++ b/plparse/tests/Makefile.am
@@ -64,4 +64,5 @@ EXTRA_DIST =			\
 	really-flv.mp4		\
 	audio.php		\
 	big5.smi		\
-	O_G_Money_-_Girl_Gotta_girlfriend_Feat._O_G_Money_Snoop_Dogg.m3u
+	O_G_Money_-_Girl_Gotta_girlfriend_Feat._O_G_Money_Snoop_Dogg.m3u \
+	empty-asx.asx
diff --git a/plparse/tests/empty-asx.asx b/plparse/tests/empty-asx.asx
new file mode 100644
index 0000000..3df8b40
--- /dev/null
+++ b/plparse/tests/empty-asx.asx
@@ -0,0 +1,8 @@
+<asx version="3.0">
+
+				
+					
+
+
+
+</asx>
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index 903047f..bf5dd5d 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -471,6 +471,15 @@ test_m3u_leading_tabs (void)
 }
 
 static void
+test_empty_asx (void)
+{
+	char *uri;
+	uri = get_relative_uri (TEST_SRCDIR "empty-asx.asx");
+	g_assert (simple_parser_test (uri) == TOTEM_PL_PARSER_RESULT_SUCCESS);
+	g_free (uri);
+}
+
+static void
 test_parsing_rtsp_text_multi (void)
 {
 	char *uri;
@@ -823,6 +832,7 @@ main (int argc, char *argv[])
 		g_test_add_func ("/parser/parsing/m3u_separator", test_m3u_separator);
 		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);
 
 		return g_test_run ();
 	}



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