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
6dfb983c
Commit
6dfb983c
authored
Feb 28, 2014
by
Julien Lopez
Browse files
Includes xsltmark tests in the suite.
parent
9eaa25f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile.distrib
View file @
6dfb983c
...
...
@@ -291,7 +291,7 @@ clean:
rm
-f
META
rm
-rf
lib
$(RM)
tests/schema/regtest/test.cd tests/schema/regtest/test.log
$(RM)
tests/schema/test.cd tests/schema/test.log tests/misc/log tests/misc/memento.html
$(RM)
tests/schema/test.cd tests/schema/test.log tests/misc/log tests/misc/memento.html
tests/xsltmark/log tests/cql/log
$(RM)
oUnit-
*
tests/ocaml/a/c.ml tests/ocaml/a/c.cdo tests/ocaml/a/c.cmi tests/ocaml/a/c.cmo
for
i
in
$(OUNIT_TESTS)
;
do
$(RM)
`
echo
tests/ocaml/
$$
i/
$$
i tests/ocaml/
$$
i/
$$
i.ml tests/ocaml/
$$
i/
$$
i.c[dm][oxi] tests/ocaml/
$$
i/
$
${i}
test.cm[io]
`
;
done
...
...
tests/test.sh
View file @
6dfb983c
...
...
@@ -79,8 +79,8 @@ fi
echo
-n
"Tests on misc: "
SUCCESS
MISC
=
0
TOTAL
MISC
=
0
SUCCESS
=
0
TOTAL
=
0
MISCLOG
=
$ROOT
/misc/log
GOODTESTS
=
"
$ROOT
/misc/addrbook.cd
$ROOT
/misc/biblio.cd
\
$ROOT
/misc/fixml4.3v20020920.cd
$ROOT
/misc/funs.cd
$ROOT
/misc/IFX130.cd
\
...
...
@@ -99,17 +99,47 @@ echo > $MISCLOG
if
test
$EXTENDED
=
"true"
;
then
GOODTESTS
=
"
$GOODTESTS
$EXTENDEDTESTS
"
;
fi
for
i
in
$GOODTESTS
;
do
TOTAL
MISC
=
$((
$TOTAL
MISC
+
1
))
TOTAL
=
$((
$TOTAL
+
1
))
echo
"==============
`
echo
$i
| rev |
cut
-d
"/"
-f
-1
| rev
`
==============="
>>
$MISCLOG
;
$ROOT
/../cduce
$i
>
/dev/null 2>>
$MISCLOG
;
if
test
$?
-eq
0
;
then
SUCCESS
MISC
=
$((
$SUCCESS
MISC
+
1
))
;
fi
if
test
$?
-eq
0
;
then
SUCCESS
=
$((
$SUCCESS
+
1
))
;
fi
done
for
i
in
$BADTESTS
;
do
TOTAL
MISC
=
$((
$TOTAL
MISC
+
1
))
TOTAL
=
$((
$TOTAL
+
1
))
echo
"==============
`
echo
$i
| rev |
cut
-d
"/"
-f
-1
| rev
`
==============="
>>
$MISCLOG
;
$ROOT
/../cduce
$i
>
/dev/null 2>>
$MISCLOG
;
if
test
$?
-ne
0
;
then
SUCCESS
MISC
=
$((
$SUCCESS
MISC
+
1
))
;
fi
if
test
$?
-ne
0
;
then
SUCCESS
=
$((
$SUCCESS
+
1
))
;
fi
done
echo
"
$SUCCESSMISC
/
$TOTALMISC
passed."
echo
"
$SUCCESS
/
$TOTAL
passed."
# Test xsltmark
SUCCESS
=
0
TOTAL
=
0
XSLTLOG
=
$ROOT
/xsltmark/log
GOODTESTS
=
"
$ROOT
/xsltmark/identity.cd"
EXTENDEDTESTS
=
"
$ROOT
/xsltmark/xslbench2.cd
$ROOT
/xsltmark/xslbench4.cd"
echo
-n
"Tests on xsltmark: "
echo
>
$XSLTLOG
if
test
$EXTENDED
=
"true"
;
then
GOODTESTS
=
"
$GOODTESTS
$EXTENDEDTESTS
"
;
fi
for
i
in
db100.xml db10.xml
;
do
TOTAL
=
$((
$TOTAL
+
1
))
echo
"==============dbonerow.cd --arg
$i
==============="
>>
$XSLTLOG
;
$ROOT
/../cduce
$ROOT
/xsltmark/dbonerow.cd
--arg
$ROOT
/xsltmark/testcases/
$i
>
/dev/null 2>>
$XSLTLOG
;
if
test
$?
-eq
0
;
then
SUCCESS
=
$((
$SUCCESS
+
1
))
;
fi
done
for
i
in
$GOODTESTS
;
do
TOTAL
=
$((
$TOTAL
+
1
))
echo
"==============
`
echo
$i
| rev |
cut
-d
"/"
-f
-1
| rev
`
==============="
>>
$XSLTLOG
;
$ROOT
/../cduce
$i
>
/dev/null 2>>
$XSLTLOG
;
if
test
$?
-eq
0
;
then
SUCCESS
=
$((
$SUCCESS
+
1
))
;
fi
done
echo
"
$SUCCESS
/
$TOTAL
passed."
tests/xsltmark/dbonerow.cd
View file @
6dfb983c
...
...
@@ -55,14 +55,9 @@ let fun dbonerow (<table> x : Table) : Xhtml =
)
]
match argv with
[ f ] -> (*load_xml f*)
match (argv []) with
(f,_) -> (*load_xml f*)
(match load_xml f with
| x
&
Table -> print_xml(dbonerow x)
| _ -> raise "Ma che c%$#^# di file mi hai passato?")
| _ -> raise "Please specify input file on command line"
tests/xsltmark/identity.cd
View file @
6dfb983c
...
...
@@ -19,7 +19,7 @@ let fun identity (x : Table) : Table = x;;
match load_xml "testcases/db100
00
.xml" with
match load_xml "
tests/xsltmark/
testcases/db100.xml" with
| x & Table -> print_xml(identity x)
| _ -> raise "Ma che c%$#^# di file mi hai passato?";;
...
...
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