From 51d105180001bb8c0be8c1ea8b59a10b6e602f34 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Sat, 29 Jan 2011 10:24:44 +0000 Subject: [PATCH] added version test of perl and ruby git-svn-id: http://biopieces.googlecode.com/svn/trunk@1221 74ccb610-7750-0410-82ae-013aeee3265d --- bp_test/lib/test.sh | 26 ++++++++++++++++++++++++++ bp_test/test_all | 3 +++ 2 files changed, 29 insertions(+) diff --git a/bp_test/lib/test.sh b/bp_test/lib/test.sh index fd2566d..5d33f1d 100755 --- a/bp_test/lib/test.sh +++ b/bp_test/lib/test.sh @@ -96,3 +96,29 @@ function clean rm "$tmp" fi } + +function test_perl +{ + echo -n "Testing Perl version ... " + + if error=$( perl -e 'use 5.8.0;' 2>&1 ); then + echo_green "OK" + else + echo $error | sed "s/, stopped.*//" + echo_red "FAIL" + exit + fi +} + +function test_ruby +{ + echo -n "Testing Ruby version ... " + + if error=$( ruby -e 'raise "Ruby version 1.9 reqauired--this is only #{RUBY_VERSION}" if RUBY_VERSION < "1.9"' 2>&1 ); then + echo_green "OK" + else + echo $error | sed "s/.*: //" + echo_red "FAIL" + exit + fi +} diff --git a/bp_test/test_all b/bp_test/test_all index 6e2ddc8..397db6a 100755 --- a/bp_test/test_all +++ b/bp_test/test_all @@ -6,6 +6,9 @@ if [ -f $log_file ]; then rm $log_file fi +test_perl +test_ruby + count=0 time0=`date +%s` -- 2.39.2