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
564137ed
Commit
564137ed
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-11-29 11:06:34 by szach] removed old test script
Original author: szach Date: 2003-11-29 11:06:34+00:00
parent
00e59227
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/schema/regtest/test.sh
deleted
100755 → 0
View file @
00e59227
#!/bin/sh
# to be run from CDuce source tree root
VALIDATE
=
"./validate"
ROOT
=
"schema/regtest"
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/'
`
elif
(
echo
$1
|
grep
"
\.
cd"
>
/dev/null
)
then
./cduce
$ROOT
/
$1
else
echo
"Don't know what to do with '
$1
'."
fi
else
echo
"Don't know what to do with '
$1
'."
fi
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
echo
"OK"
|
tee
-a
$LOG
else
echo
"FAILURE"
|
tee
-a
$LOG
fi
done
for
s
in
$ROOT
/
*
.cd
;
do
# run CDuce scripts
echo
-n
"
`
basename
$s
`
... "
|
tee
-a
$LOG
if
(
./cduce
$s
>
/dev/null 2>&1
)
;
then
echo
"OK"
|
tee
-a
$LOG
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