-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathruntests
More file actions
executable file
·35 lines (26 loc) · 1.05 KB
/
runtests
File metadata and controls
executable file
·35 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
set -e -x
spago build
case $1 in
ccap)
DB=dev15-db.wicourts.gov:5612:cc:viewer:somepassword
./get-schema.js --config $DB -d > samples/Domains.tmpl --purs-pkg Samples.Domains --scala-pkg samples.Domains
./get-schema.js --config $DB -t Case > samples/Case.tmpl --purs-pkg Samples.Case --scala-pkg samples.Case
;;
esac
for i in samples/*.tmpl; do
# Attempts to compile the input.tmpl, reporting parsing errors if
# not parsed correctly. NOTE: this passing does NOT guarantee a
# working purescript or scala file on generation; for example, if
# a type is undefined, no error checking catches this.
./codegen.js -m test $i
# Pretty-print county.tmpl to the console. Removes comments and
# puts the template in a readable format.
./codegen.js -m pretty $i
# Generate the purescript file from the given template
./codegen.js -m purs $i
# Generate the scala file from the given template
./codegen.js -m scala $i
# TODO: Test compilation of generated output.
done
spago test