Commit 401210ff authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-06-27 08:04:14 by cvscast] zack: added support for tests that should fail

Original author: cvscast
Date: 2003-06-27 08:04:14+00:00
parent aaae4322
all.xsd ... OK
anyURI.xsd ... OK
attrib.xsd ... OK
choice.xsd ... OK
cm_ext.xsd ... OK
dateTime.xsd ... OK
date.xsd ... OK
duration.xsd ... OK
empty.xsd ... OK
flatten.xsd ... OK
gDay.xsd ... OK
global_attrib.xsd ... OK
gMonthDay.xsd ... OK
gMonth.xsd ... OK
gYearMonth.xsd ... OK
gYear.xsd ... OK
hexBinary.xsd ... OK
integer.xsd ... OK
list_of_list.xsd ... FAILURE
mails.xsd ... OK
recursion2.xsd ... OK
recursion.xsd ... OK
signed.xsd ... OK
simple_type_recursion.xsd ... FAILURE
simple.xsd ... OK
time.xsd ... OK
two_or_more.xsd ... OK
all.cd ... OK
flatten.cd ... OK
mails.cd ... OK
recursion.cd ... OK
......@@ -2,8 +2,9 @@
# to be run from CDuce source tree root
VALIDATE="./validate"
ROOT="schema/regtest"
LOG="$ROOT/regtest.log"
if [ ! -z "$1" ]; then
LOG="$ROOT/regtest.log" # where to save test results
EXPECTED="$ROOT/regtest.expected" # expected results, to be compare with $LOG
if [ ! -z "$1" ]; then # argument given: one shot test?
if [ -f "$ROOT/$1" ]; then
if (echo $1 | grep "\.xsd" > /dev/null) then
$VALIDATE $ROOT/$1 $ROOT/`echo "$1" | sed 's/xsd$/xml/'`
......@@ -15,9 +16,8 @@ if [ ! -z "$1" ]; then
else
echo "Don't know what to do with '$1'."
fi
else
touch $LOG
date | tee $LOG
else # no argument given: perform all tests
rm -f $LOG # clear old logs
for f in $ROOT/*.xsd; do # test each .xsd using "validate"
echo -n "`basename $f` ... " | tee -a $LOG
if ($VALIDATE $f `echo "$f" | sed 's/xsd$/xml/'` > /dev/null 2>&1); then
......@@ -34,4 +34,15 @@ else
echo "FAILURE" | tee -a $LOG
fi
done
echo
echo "Diffing LOG with EXPECTED ..."
if diff $LOG $EXPECTED; then
echo
echo "You're lucky: all(???) seems fine!"
echo
else
echo
echo "Ah AAAh: something wrong!"
echo
fi
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment