git @ Cat's Eye Technologies Larabee / c1e8032
Add a rudimentary test. Cat's Eye Technologies 11 years ago
1 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 # basically just a sanity test
3
4 if [ -z $SCHEME_IMPL ]; then
5 SCHEME_IMPL='csi -q'
6 fi
7
8 cd src
9 cat >test-input.txt <<EOF
10 (test2)
11 4
12 9
13 EOF
14 cat >expected-output.txt <<EOF
15 13
16 OK
17
18 EOF
19 $SCHEME_IMPL test.scm < test-input.txt > test-output.txt || exit 1
20 diff -u expected-output.txt test-output.txt
21 RESULT=$?
22 rm -f test-input.txt expected-output.txt test-output.txt
23 exit $RESULT