forked from ccap/purescript-ccap-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntests
More file actions
executable file
·35 lines (26 loc) · 1012 Bytes
/
runtests
File metadata and controls
executable file
·35 lines (26 loc) · 1012 Bytes
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
./get-schema.js --config $DB -d > samples/Domains.tmpl
./get-schema.js --config $DB -t Case > samples/Case.tmpl
;;
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 -p unused $i
# Pretty-print county.tmpl to the console. Removes comments and
# puts the template in a readable format.
./codegen.js -m pretty -p unused $i
# Generate the purescript file from the given template
./codegen.js -p Ccap.Cc.Test -m purs $i
# Generate the scala file from the given template
./codegen.js -p gov.wicourts.cc -m scala $i
# TODO: Test compilation of generated output.
done
spago test