3 bp=`basename $0 | sed s/^test_//`
4 in="$BP_DIR/bp_test/in/$bp.in"
5 out="$BP_DIR/bp_test/out/$bp.out"
7 tmp_dir="$BP_TMP/test_tmp"
8 log_file="$BP_TMP/test.log"
14 echo -n "Testing $command ... "
15 eval $command > /dev/null 2>&1
22 eval $command > /dev/null 2>&1
25 function assert_no_diff
30 if [ ! -f $src ]; then
36 if [ ! -f $dst ]; then
42 local diff=`diff -q $src $dst`
44 if [ "$diff" != "" ]; then
53 function assert_files_exists
58 if [ ! -f $arg ]; then
63 if [ $error = 1 ]; then
76 echo "$msg" >> $log_file
83 echo -e "\033[32;38m$msg\033[0m"
90 echo -e "\033[33;38m$msg\033[0m"
97 echo -e "\033[31;38m$msg\033[0m"
102 if [ -f "$tmp" ]; then
109 echo -n "Testing Perl version ... "
111 if error=$( perl -e 'use 5.8.0;' 2>&1 ); then
114 echo $error | sed "s/, stopped.*//"
122 echo -n "Testing Ruby version ... "
124 if error=$( ruby -e 'raise "Ruby version 1.9 reqauired--this is only #{RUBY_VERSION}" if RUBY_VERSION < "1.9"' 2>&1 ); then
127 echo $error | sed "s/.*: //"