6 | 6 |
GLOB="eg/*.tamsin lib/*.tamsin mains/*.tamsin"
|
7 | 7 |
|
8 | 8 |
mkdir -p tmp
|
9 | |
make all || exit 1
|
10 | 9 |
|
11 | 10 |
if [ x$1 = 'x-f' ]; then
|
12 | 11 |
shift
|
|
79 | 78 |
fi
|
80 | 79 |
|
81 | 80 |
if [ $MODE = "compiled" ]; then
|
|
81 |
make c_src/libtamsin.a || exit 1
|
82 | 82 |
echo "*** Compiling $SRC (with $LIBS)"
|
83 | 83 |
echo "*** and testing it against '$CMD'..."
|
84 | 84 |
bin/tamsin compile $LIBS $SRC > tmp/foo.c && \
|
|
110 | 110 |
exit 0
|
111 | 111 |
}
|
112 | 112 |
|
113 | |
if [ x$1 = xcompiler ]; then
|
|
113 |
if [ x$1 = xinterpreter -o x$1 = xi ]; then
|
|
114 |
echo "*** Testing Python interpreter..."
|
|
115 |
falderal $VERBOSE --substring-error fixture/tamsin.py.markdown $FILES
|
|
116 |
elif [ x$1 = xcompiler ]; then
|
|
117 |
make c_src/libtamsin.a || exit 1
|
114 | 118 |
echo "*** Testing compiler..."
|
115 | 119 |
falderal $VERBOSE --substring-error fixture/compiler.py.markdown $FILES
|
116 | |
elif [ x$1 = xinterpreter -o x$1 = xi ]; then
|
117 | |
echo "*** Testing Python interpreter..."
|
118 | |
falderal $VERBOSE --substring-error fixture/tamsin.py.markdown $FILES
|
119 | 120 |
elif [ x$1 = xgrammar ]; then
|
120 | 121 |
test_it $MODE "mains/grammar.tamsin" \
|
121 | 122 |
"lib/tamsin_scanner.tamsin" \
|
|
152 | 153 |
echo "*** Testing Bootstrapped Tamsin-in-Tamsin compiler..."
|
153 | 154 |
falderal $VERBOSE --substring-error fixture/bootstrapped.markdown $FILES
|
154 | 155 |
elif [ x$1 = xmicro ]; then
|
|
156 |
make bin/micro-tamsin || exit 1
|
155 | 157 |
echo "*** Testing Micro-Tamsin interpreter..."
|
156 | 158 |
FILES="doc/Micro-Tamsin.markdown"
|
157 | 159 |
falderal $VERBOSE --substring-error fixture/micro-tamsin.markdown $FILES
|