7 [ -n "$RUBY" ] || RUBY
=ruby
9 # run_test program expected_output
16 echo "FAIL: exit status is $s"
17 errors
=$
((errors
+ 1))
18 elif [ "$output" != "$3" ]
20 echo "FAIL: wrong output"
21 errors
=$
((errors
+ 1))
28 run_test
"$1" "./$1" "$2"
32 run_test2
"$1" "`cat $1.out`"
35 run_test2 hello
"Hello, world!"
49 run_test2 fact
479001600
73 run_test2 tail-calls
''
79 printf 'test_output_name...'
80 $RUBY test_output_name.rb
81 [ $?
-eq 0 ] || errors
=$
((errors
+ 1))
87 echo "$errors tests failed"