0 | 0 |
#!/bin/sh
|
1 | 1 |
|
2 | |
echo "Sanity-testing scheme.sh and pixley.sh..."
|
|
2 |
echo "Sanity-testing tower.sh..."
|
3 | 3 |
|
4 | 4 |
cat >expected.sexp <<EOF
|
5 | 5 |
(two three)
|
6 | 6 |
EOF
|
7 | |
script/scheme.sh eg/simple.pix > out.sexp
|
|
7 |
script/tower.sh eg/simple.pix > out.sexp
|
8 | 8 |
diff -u expected.sexp out.sexp
|
9 | |
script/pixley.sh eg/simple.pix > out.sexp
|
|
9 |
script/tower.sh src/pixley.pix eg/simple.pix > out.sexp
|
10 | 10 |
diff -u expected.sexp out.sexp
|
11 | 11 |
rm -f expected.sexp out.sexp
|
12 | 12 |
|
13 | 13 |
cat >expected.sexp <<EOF
|
14 | 14 |
(ten (eight nine) seven six five four three two one)
|
15 | 15 |
EOF
|
16 | |
script/scheme.sh eg/reverse.pix eg/some-list.sexp > out.sexp
|
|
16 |
script/tower.sh eg/reverse.pix eg/some-list.sexp > out.sexp
|
17 | 17 |
diff -u expected.sexp out.sexp
|
18 | |
script/pixley.sh eg/reverse.pix eg/some-list.sexp > out.sexp
|
|
18 |
script/tower.sh src/pixley.pix eg/reverse.pix + eg/some-list.sexp > out.sexp
|
19 | 19 |
diff -u expected.sexp out.sexp
|
20 | 20 |
rm -f expected.sexp out.sexp
|
21 | 21 |
|
22 | 22 |
echo "Testing Pixley programs as Scheme programs..."
|
23 | 23 |
|
24 | |
cd src && PIXLEY=R5RS falderal test tests.falderal
|
25 | |
rm -f foo.pix
|
26 | |
cd ..
|
|
24 |
falderal test -f 'Interpret Pixley Program:shell command "script/tower.sh %(test) >%(output)"' src/tests.falderal
|
27 | 25 |
|
28 | |
echo "Testing Pixley programs on reference interpreter..."
|
|
26 |
echo "Testing Pixley programs on Pixley reference interpreter..."
|
29 | 27 |
|
30 | |
cd src && falderal test tests.falderal
|
31 | |
rm -f foo.pix
|
32 | |
cd ..
|
|
28 |
falderal test -f 'Interpret Pixley Program:shell command "script/tower.sh src/pixley.pix %(test) >%(output)"' src/tests.falderal
|
33 | 29 |
|
34 | 30 |
echo "Running Falderal tests for P-Normalizer..."
|
35 | 31 |
|
36 | |
cd dialect && falderal test p-normal.falderal
|
37 | |
rm -f foo.pix
|
38 | |
cd ..
|
|
32 |
falderal test dialect/p-normal.falderal
|
39 | 33 |
|
40 | 34 |
echo "P-Normalizing Pixley interpreter..."
|
41 | 35 |
|
42 | |
script/pixley.sh dialect/p-normal.pix src/pixley.pix > src/p-normal-pixley.pix
|
|
36 |
script/tower.sh src/pixley.pix dialect/p-normal.pix + src/pixley.pix > src/p-normal-pixley.pix
|
43 | 37 |
|
44 | 38 |
echo "Testing Pixley programs on P-Normalized interpreter..."
|
45 | 39 |
|
46 | |
cd src && PIXLEY=p-normal-pixley.pix falderal test tests.falderal
|
47 | |
rm -f foo.pix p-normal-pixley.pix
|
48 | |
cd ..
|
|
40 |
falderal test -f 'Interpret Pixley Program:shell command "script/tower.sh src/p-normal-pixley.pix %(test) >%(output)"' src/tests.falderal
|
49 | 41 |
|
50 | |
echo "Testing Pixley programs on Pixley interpreter in Pifxley..."
|
|
42 |
rm -f src/p-normal-pixley.pix
|
51 | 43 |
|
52 | |
cd src && PIXLEY=../dialect/pixley.pifx falderal test tests.falderal
|
53 | |
rm -f foo.pix
|
54 | |
cd ..
|
|
44 |
#echo "Testing Pixley programs on Pixley interpreter in Pifxley..."
|
|
45 |
#cd src && PIXLEY=../dialect/pixley.pifx falderal test tests.falderal
|
|
46 |
#rm -f foo.pix
|
|
47 |
#cd ..
|
55 | 48 |
|
56 | |
echo "Testing Pifxley programs on Pifxley interpreter in Pifxley..."
|
57 | |
|
58 | |
cd dialect && PIXLEY=../dialect/pifxley.pifx falderal test pifxley.falderal
|
59 | |
rm -f foo.pifx
|
60 | |
cd ..
|
|
49 |
#echo "Testing Pifxley programs on Pifxley interpreter in Pifxley..."
|
|
50 |
#cd dialect && PIXLEY=../dialect/pifxley.pifx falderal test pifxley.falderal
|
|
51 |
#rm -f foo.pifx
|
|
52 |
#cd ..
|
61 | 53 |
|
62 | 54 |
# Optional Mini-Scheme tests
|
63 | 55 |
|