From 72639626f71ebc3fc58fcaf3b238c9250d6e27e5 Mon Sep 17 00:00:00 2001 From: michelou Date: Fri, 28 Sep 2007 12:37:19 +0000 Subject: fixed small bug with date command --- test/scalatest | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/scalatest') diff --git a/test/scalatest b/test/scalatest index 9510b08409..c12a3ec1c9 100755 --- a/test/scalatest +++ b/test/scalatest @@ -644,12 +644,9 @@ case `$JAVACMD \-version 2>&1 | xargs` in * ) JAVA5="false";; esac; -DIFF="diff"; - -case `uname` in - CYGWIN* ) - DIFF="diff --text --strip-trailing-cr"; - ;; +case "$UNAME" in + CYGWIN* ) DIFF="diff --text --strip-trailing-cr";; + * ) DIFF="diff";; esac; while [ $# -gt 0 ]; do @@ -831,7 +828,10 @@ END_SECONDS=`date +%s`; TOTAL_COUNT=`echo "$FAILURE_COUNT+$SUCCESS_COUNT" | bc`; ELAPSED_SECONDS=`expr $END_SECONDS - $START_SECONDS`; -ELAPSED_TIME=`date --date="1970-01-01 $ELAPSED_SECONDS sec" +%T`; +case "$UNAME" in + Darwin* ) ELAPSED_TIME=`date -r $ELAPSED_SECONDS +%T`;; + * ) ELAPSED_TIME=`date --date="1970-01-01 $ELAPSED_SECONDS sec" +%T`;; +esac; if [ $FAILURE_COUNT -eq 0 ]; then printf_success "All of $TOTAL_COUNT tests were successful (elapsed time: $ELAPSED_TIME)\\n"; -- cgit v1.2.3