7 # run_test program expected_output
14 echo "FAIL: exit status is $s"
15 errors
=$
((errors
+ 1))
16 elif [ "$output" != "$3" ]
18 echo "FAIL: wrong output"
19 errors
=$
((errors
+ 1))
26 run_test
"$1" "./$1" "$2"
30 run_test2
"$1" "`cat $1.out`"
33 run_test2 hello
"Hello, world!"
41 run_test2 fact
479001600
59 run_test2 tail-calls
''
65 echo "$errors tests failed"