]> granicus.if.org Git - libexpat/commitdiff
Included "invalid" test cases, to check if the parser reports them
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Wed, 4 Sep 2002 03:04:44 +0000 (03:04 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Wed, 4 Sep 2002 03:04:44 +0000 (03:04 +0000)
as well-formed without errors.

expat/tests/xmltest.sh

index 4a495055bd91ca5d48b2fca9f95f3372b1893ce5..ecb16371510ad9886e09793d41be274430f38bb4 100755 (executable)
@@ -14,7 +14,6 @@
 # output differs are prefixed with "Output differs:", and a diff file
 # is generated in the appropriate subdirectory under $OUTPUT.
 
-# The script does not use "invalid" test cases for validating parsers.
 # If there are output files provided, the script will use
 # output from xmlwf and compare the desired output against it.
 # However, one has to take into account that the canonical output
@@ -26,12 +25,11 @@ cd "$MYDIR"
 MYDIR="`pwd`"
 XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf"
 # XMLWF=/usr/local/bin/xmlwf
-# XMLWF=f:/Libraries/XML/expat/xmlwf/release/xmlwf
 TS="$MYDIR/XML-Test-Suite"
-# OUTPUT must terminate with the directory separater.
+# OUTPUT must terminate with the directory separator.
 OUTPUT="$TS/out/"
 # OUTPUT=/home/tmp/xml-testsuite-out/
-# OUTPUT=f:/Libraries/XML/XML-Test-Suite/out/
+
 
 RunXmlwfNotWF() {
   $XMLWF $1 $2 > outfile || return $?
@@ -66,12 +64,20 @@ RunXmlwfWF() {
 SUCCESS=0
 ERROR=0
 
+##########################
+# well-formed test cases #
+##########################
+
 cd "$TS/xmlconf"
 for xmldir in ibm/valid/P*/ \
+              ibm/invalid/P*/ \
               xmltest/valid/ext-sa/ \
               xmltest/valid/not-sa/ \
+              xmltest/invalid/ \
+              xmltest/invalid/not-sa/ \
               xmltest/valid/sa/ \
-              sun/valid/ ; do
+              sun/valid/ \
+              sun/invalid/ ; do
   cd "$TS/xmlconf/$xmldir"
   mkdir -p "$OUTPUT$xmldir"
   for xmlfile in *.xml ; do
@@ -95,6 +101,10 @@ for xmlfile in *pass*.xml ; do
 done
 rm outfile
 
+##############################
+# not well-formed test cases #
+##############################
+
 cd "$TS/xmlconf"
 for xmldir in ibm/not-wf/P*/ \
               ibm/not-wf/misc/ \