From aa6a61475b228756573a1364ca2d840be7c94d2e Mon Sep 17 00:00:00 2001 From: Karl Waclawek Date: Wed, 4 Sep 2002 03:04:44 +0000 Subject: [PATCH] Included "invalid" test cases, to check if the parser reports them as well-formed without errors. --- expat/tests/xmltest.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/expat/tests/xmltest.sh b/expat/tests/xmltest.sh index 4a495055..ecb16371 100755 --- a/expat/tests/xmltest.sh +++ b/expat/tests/xmltest.sh @@ -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/ \