Commit 1eee57a0 authored by Michael Hanus 's avatar Michael Hanus
Browse files

test suite of SQL integration added

parent 838de2e3
......@@ -25,6 +25,10 @@
{ "src-dir": "src/IntegratedCode/Examples",
"modules": [ "testFormat", "testHtml", "testRegExps" ]
},
{ "src-dir": "src/IntegratedCode/ExamplesSQL",
"options": "-v",
"script" : "test.sh"
},
{ "src-dir": "src/DefaultRules/Examples",
"options": "-m40",
"modules": [ "BreakWhere", "BubbleSort", "ColorMap", "DutchFlag",
......
{- ERD specification read from uni.xmi -}
-- ERD specification for university lectures.
import Database.ERD
uniERD :: ERD
uniERD =
ERD "Uni"
[Entity "Student"
[Attribute "Name" (StringDom Nothing) NoKey False,
......
......@@ -6,6 +6,24 @@ CURRYROOT=`curry :set v0 :set -time :add Distribution :eval "putStrLn installDir
CURRYBIN=$CURRYROOT/bin
if [ -x "$CURRYBIN/pakcs" ] ; then
CURRYEXEC=pakcs
elif [ -x "$CURRYBIN/kics2" ] ; then
CURRYEXEC=kics2
else
echo "ERROR: Unknown Curry system!"
exit 1
fi
ERD2CURRY=$HOME/.cpm/bin/erd2curry
if [ ! -x "$ERD2CURRY" ] ; then
ERD2CURRY=$CURRYBIN/$CURRYEXEC-erd2curry
if [ ! -x "$ERD2CURRY" ] ; then
echo "No executable 'erd2curry' found!"
exit 1
fi
fi
ALLTESTS="test*.curry"
VERBOSE=no
......@@ -20,7 +38,7 @@ export PATH
cleandir () {
$CURRYBIN/cleancurry
/bin/rm -f $LOGFILE *_PUBLIC.curry TEST*.curry
/bin/rm -f Uni_ERDT.term Uni_SQLCode.info Uni_CDBI.curry Uni.db
/bin/rm -f Uni.erdterm Uni_ERDT.term Uni_SQLCode.info Uni_CDBI.curry Uni.db
$CURRYBIN/cleancurry
}
......@@ -28,7 +46,7 @@ cleandir () {
exectests() {
cleandir
# compile model:
$CURRYBIN/curry erd2cdbi Uni_ERD.term `pwd`/Uni.db
"$ERD2CURRY" --db `pwd`/Uni.db --cdbi UniERD.curry
# fill database:
$CURRYBIN/curry $REPL_OPTS :l CreateData :eval createTestData :q
# run query tests:
......
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