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

sping at svn.xiph.org sping at svn.xiph.org
Wed Apr 25 06:52:01 PDT 2007


Author: sping
Date: 2007-04-25 06:52:01 -0700 (Wed, 25 Apr 2007)
New Revision: 12895

Modified:
   trunk/xspf/testcase/schema_test.sh
Log:
xmllint added, which confirms previous results


Modified: trunk/xspf/testcase/schema_test.sh
===================================================================
--- trunk/xspf/testcase/schema_test.sh	2007-04-23 15:51:20 UTC (rev 12894)
+++ trunk/xspf/testcase/schema_test.sh	2007-04-25 13:52:01 UTC (rev 12895)
@@ -28,6 +28,7 @@
 	XML_STARLET=xmlstarlet
 fi
 RNV=./rnv
+XMLLINT=xmllint
 
 
 
@@ -59,7 +60,7 @@
 # -----------------------------------------------------------------------------
 # Test RNC
 # -----------------------------------------------------------------------------
-echo "== Relax NG Compact - Should have failed ==" >> ${LOG_FILE}
+echo "== Relax NG Compact - RNV - Should have failed ==" >> ${LOG_FILE}
 for i in ${FAIL_FILES}; do
 	if ${RNV} ${RNC_FILE} $i &>/dev/null ; then
 		echo $i >> ${LOG_FILE}
@@ -67,7 +68,7 @@
 done
 echo "" >> ${LOG_FILE}
 
-echo "== Relax NG Compact - Should have passed ==" >> ${LOG_FILE}
+echo "== Relax NG Compact - RNV - Should have passed ==" >> ${LOG_FILE}
 for i in ${PASS_FILES}; do
 	if ! ${RNV} ${RNC_FILE} $i &>/dev/null ; then
 		echo $i >> ${LOG_FILE}
@@ -80,29 +81,61 @@
 # -----------------------------------------------------------------------------
 # Test RNG
 # -----------------------------------------------------------------------------
-echo "== Relax NG XML - Should have failed ==" >> ${LOG_FILE}
+echo "== Relax NG XML - XMLStarlet - Should have failed ==" >> ${LOG_FILE}
 ${XML_STARLET} validate --err --list-good --relaxng ${RNG_FILE} ${FAIL_FILES} 1>> ${LOG_FILE} 2>> /dev/null
 echo "" >> ${LOG_FILE}
 
-echo "== Relax NG XML - Should have passed ==" >> ${LOG_FILE}
+echo "== Relax NG XML - XMLStarlet - Should have passed ==" >> ${LOG_FILE}
 ${XML_STARLET} validate --err --list-bad --relaxng ${RNG_FILE} ${PASS_FILES} 1>> ${LOG_FILE} 2>> /dev/null
 echo "" >> ${LOG_FILE}
 
+echo "== Relax NG XML - xmllint - Should have failed ==" >> ${LOG_FILE}
+for i in ${FAIL_FILES}; do
+	if ${XMLLINT} --relaxng ${RNG_FILE} --noout $i &>/dev/null ; then
+		echo $i >> ${LOG_FILE}
+	fi
+done
+echo "" >> ${LOG_FILE}
 
+echo "== Relax NG XML - xmllint - Should have passed ==" >> ${LOG_FILE}
+for i in ${PASS_FILES}; do
+	if ! ${XMLLINT} --relaxng ${RNG_FILE} --noout $i &>/dev/null ; then
+		echo $i >> ${LOG_FILE}
+	fi
+done
+echo "" >> ${LOG_FILE}
 
+
+
 # -----------------------------------------------------------------------------
-# Test XSD
+# Test XSD/WXS
 # -----------------------------------------------------------------------------
-echo "== W3C XML Schema - Should have failed ==" >> ${LOG_FILE}
+echo "== W3C XML Schema - XMLStarlet - Should have failed ==" >> ${LOG_FILE}
 ${XML_STARLET} validate --err --list-good --xsd ${XSD_FILE} ${FAIL_FILES} 1>> ${LOG_FILE} 2>> /dev/null
 echo "" >> ${LOG_FILE}
 
-echo "== W3C XML Schema - Should have passed ==" >> ${LOG_FILE}
+echo "== W3C XML Schema - XMLStarlet - Should have passed ==" >> ${LOG_FILE}
 ${XML_STARLET} validate --err --list-bad --xsd ${XSD_FILE} ${PASS_FILES} 1>> ${LOG_FILE} 2>> /dev/null
-# echo "" >> ${LOG_FILE}
+echo "" >> ${LOG_FILE}
 
+echo "== W3C XML Schema - xmllint - Should have failed ==" >> ${LOG_FILE}
+for i in ${FAIL_FILES}; do
+	if ${XMLLINT} --schema ${XSD_FILE} --noout $i &>/dev/null ; then
+		echo $i >> ${LOG_FILE}
+	fi
+done
+echo "" >> ${LOG_FILE}
 
+echo "== W3C XML Schema - xmllint - Should have passed ==" >> ${LOG_FILE}
+for i in ${PASS_FILES}; do
+	if ! ${XMLLINT} --schema ${XSD_FILE} --noout $i &>/dev/null ; then
+		echo $i >> ${LOG_FILE}
+	fi
+done
+echo "" >> ${LOG_FILE}
 
+
+
 # -----------------------------------------------------------------------------
 # Show log
 # -----------------------------------------------------------------------------



More information about the commits mailing list