[xiph-commits] r12926 - trunk/xspf/testcase

sping at svn.xiph.org sping at svn.xiph.org
Mon May 7 14:11:23 PDT 2007


Author: sping
Date: 2007-05-07 14:11:21 -0700 (Mon, 07 May 2007)
New Revision: 12926

Modified:
   trunk/xspf/testcase/schema_test.sh
Log:
spiff_check integration


Modified: trunk/xspf/testcase/schema_test.sh
===================================================================
--- trunk/xspf/testcase/schema_test.sh	2007-05-07 20:58:45 UTC (rev 12925)
+++ trunk/xspf/testcase/schema_test.sh	2007-05-07 21:11:21 UTC (rev 12926)
@@ -15,8 +15,10 @@
 RNG_1_FILE="${SCHEMA_PATH}/xspf-0_0.5.rng"
 RNG_1_FILE="${SCHEMA_PATH}/xspf-1_0.5.rng"
 XSD_FILE="${SCHEMA_PATH}/xspf-1_0.2.xsd"
+FAIL_0_FILES="for_version_0/fail/*.xspf"
+PASS_0_FILES="for_version_0/pass/*.xspf"
+FAIL_1_FILES="for_version_1/fail/*.xspf"
 PASS_1_FILES="for_version_1/pass/*.xspf"
-FAIL_1_FILES="for_version_1/fail/*.xspf"
 LOG_FILE="schema_test_log.txt"
 
 
@@ -31,6 +33,7 @@
 fi
 RNV=rnv
 XMLLINT=xmllint
+SPIFF_CHECK=spiff_check
 
 
 
@@ -48,6 +51,7 @@
 echo "RNV "`${RNV} -v 2>&1 | grep version | sed -r "s/rnv version (.+)/\1/"` >> ${LOG_FILE}
 echo "xmllint #"`${XMLLINT} --version 2>&1 | grep version | sed -r "s/[^0-9]+//"` >> ${LOG_FILE}
 echo "XMLStarlet "`${XML_STARLET} --version` >> ${LOG_FILE}
+echo "spiff_check "`${SPIFF_CHECK} --version | sed -r "s/[^0-9]+//"` >> ${LOG_FILE}
 echo "" >> ${LOG_FILE}
 
 
@@ -73,11 +77,11 @@
 echo "" >> ${LOG_FILE}
 
 echo "===== Should have passed =====" >> ${LOG_FILE}
-for i in ${PASS_0_FILES}; do
-	if ! ${RNV} ${RNC_0_FILE} $i &>/dev/null ; then
-		echo $i >> ${LOG_FILE}
-	fi
-done
+#for i in ${PASS_0_FILES}; do
+#	if ! ${RNV} ${RNC_0_FILE} $i &>/dev/null ; then
+#		echo $i >> ${LOG_FILE}
+#	fi
+#done
 echo "" >> ${LOG_FILE}
 
 
@@ -92,7 +96,7 @@
 echo "" >> ${LOG_FILE}
 
 echo "===== Should have passed =====" >> ${LOG_FILE}
-${XML_STARLET} validate --err --list-bad --relaxng ${RNG_0_FILE} ${PASS_0_FILES} 1>> ${LOG_FILE} 2>> /dev/null
+#${XML_STARLET} validate --err --list-bad --relaxng ${RNG_0_FILE} ${PASS_0_FILES} 1>> ${LOG_FILE} 2>> /dev/null
 echo "" >> ${LOG_FILE}
 
 
@@ -109,15 +113,41 @@
 echo "" >> ${LOG_FILE}
 
 echo "===== Should have passed =====" >> ${LOG_FILE}
-for i in ${PASS_0_FILES}; do
-	if ! ${XMLLINT} --relaxng ${RNG_0_FILE} --noout $i &>/dev/null ; then
-		echo $i >> ${LOG_FILE}
+#for i in ${PASS_0_FILES}; do
+#	if ! ${XMLLINT} --relaxng ${RNG_0_FILE} --noout $i &>/dev/null ; then
+#		echo $i >> ${LOG_FILE}
+#	fi
+#done
+echo "" >> ${LOG_FILE}
+
+
+
+echo "=== Without schema ===" >> ${LOG_FILE}
+echo "" >> ${LOG_FILE}
+
+echo "==== ${SPIFF_CHECK} ====" >> ${LOG_FILE}
+echo "" >> ${LOG_FILE}
+
+echo "===== Should have failed =====" >> ${LOG_FILE}
+for i in ${FAIL_0_FILES}; do
+	OUTPUT=`cat $i | ${SPIFF_CHECK} -`
+	if [ "${OUTPUT}" == "Valid XSPF-0." ]; then
+		echo $i
 	fi
 done
 echo "" >> ${LOG_FILE}
 
+echo "===== Should have passed =====" >> ${LOG_FILE}
+#for i in ${PASS_0_FILES}; do
+#	OUTPUT=`cat $i | ${SPIFF_CHECK} -`
+#	if [ "${OUTPUT}" != "Valid XSPF-0." ]; then
+#		echo $i
+#	fi
+#done
+echo "" >> ${LOG_FILE}
 
 
+
 echo "== XSPF-1 ==" >> ${LOG_FILE}
 echo "" >> ${LOG_FILE}
 echo "=== Relax NG Compact ===" >> ${LOG_FILE}
@@ -214,6 +244,32 @@
 
 
 
+echo "=== Without schema ===" >> ${LOG_FILE}
+echo "" >> ${LOG_FILE}
+
+echo "==== ${SPIFF_CHECK} ====" >> ${LOG_FILE}
+echo "" >> ${LOG_FILE}
+
+echo "===== Should have failed =====" >> ${LOG_FILE}
+for i in ${FAIL_1_FILES}; do
+	OUTPUT=`cat $i | ${SPIFF_CHECK} -`
+	if [ "${OUTPUT}" == "Valid XSPF-1." ]; then
+		echo $i
+	fi
+done
+echo "" >> ${LOG_FILE}
+
+echo "===== Should have passed =====" >> ${LOG_FILE}
+for i in ${PASS_1_FILES}; do
+	OUTPUT=`cat $i | ${SPIFF_CHECK} -`
+	if [ "${OUTPUT}" != "Valid XSPF-1." ]; then
+		echo $i
+	fi
+done
+echo "" >> ${LOG_FILE}
+
+
+
 # -----------------------------------------------------------------------------
 # Show log
 # -----------------------------------------------------------------------------



More information about the commits mailing list