git @ Cat's Eye Technologies Pixley / 72548c7
Update tests to use tower.sh (and latest Falderal.) catseye 13 years ago
3 changed file(s) with 21 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
7878 -> Tests for functionality "P-Normalize Pixley Program"
7979
8080 -> Functionality "P-Normalize Pixley Program" is implemented by
81 -> shell command "(cat >foo.pix && ../script/pixley.sh p-normal.pix foo.pix)"
82
83 -> Functionality "P-Normalize Pixley Program" is implemented by
84 -> shell command "(cat >foo.pix && ../script/scheme.sh p-normal.pix foo.pix)"
81 -> shell command "script/tower.sh src/pixley.pix dialect/p-normal.pix + %(test) >%(output)"
8582
8683 `let*` gets expanded into a series of nested, one-binding, `let*`s.
8784
11 Chris Pressey, Cat's Eye Technologies.
22
33 -> Tests for functionality "Interpret Pixley Program"
4
5 -> Functionality "Interpret Pixley Program" is implemented by
6 -> shell command "(cat >foo.pix && ../script/pixley.sh foo.pix)"
74
85 Constructing and Manipulating Data
96 ----------------------------------
00 #!/bin/sh
11
2 echo "Sanity-testing scheme.sh and pixley.sh..."
2 echo "Sanity-testing tower.sh..."
33
44 cat >expected.sexp <<EOF
55 (two three)
66 EOF
7 script/scheme.sh eg/simple.pix > out.sexp
7 script/tower.sh eg/simple.pix > out.sexp
88 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
1010 diff -u expected.sexp out.sexp
1111 rm -f expected.sexp out.sexp
1212
1313 cat >expected.sexp <<EOF
1414 (ten (eight nine) seven six five four three two one)
1515 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
1717 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
1919 diff -u expected.sexp out.sexp
2020 rm -f expected.sexp out.sexp
2121
2222 echo "Testing Pixley programs as Scheme programs..."
2323
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
2725
28 echo "Testing Pixley programs on reference interpreter..."
26 echo "Testing Pixley programs on Pixley reference interpreter..."
2927
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
3329
3430 echo "Running Falderal tests for P-Normalizer..."
3531
36 cd dialect && falderal test p-normal.falderal
37 rm -f foo.pix
38 cd ..
32 falderal test dialect/p-normal.falderal
3933
4034 echo "P-Normalizing Pixley interpreter..."
4135
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
4337
4438 echo "Testing Pixley programs on P-Normalized interpreter..."
4539
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
4941
50 echo "Testing Pixley programs on Pixley interpreter in Pifxley..."
42 rm -f src/p-normal-pixley.pix
5143
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 ..
5548
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 ..
6153
6254 # Optional Mini-Scheme tests
6355