Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
401210ff
Commit
401210ff
authored
Jul 10, 2007
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
schema/regtest/regtest.expected
0 → 100644
View file @
401210ff
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
schema/regtest/test.sh
View file @
401210ff
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment