summaryrefslogtreecommitdiff
path: root/test/scalatest
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-09-28 12:37:19 +0000
committermichelou <michelou@epfl.ch>2007-09-28 12:37:19 +0000
commit72639626f71ebc3fc58fcaf3b238c9250d6e27e5 (patch)
tree0cf991b2180a6abc208148f1f90fbd33d6d88fb9 /test/scalatest
parent9f847abf34ae332760f59a8a0131c003d2959344 (diff)
downloadscala-72639626f71ebc3fc58fcaf3b238c9250d6e27e5.tar.gz
scala-72639626f71ebc3fc58fcaf3b238c9250d6e27e5.tar.bz2
scala-72639626f71ebc3fc58fcaf3b238c9250d6e27e5.zip
fixed small bug with date command
Diffstat (limited to 'test/scalatest')
-rwxr-xr-xtest/scalatest14
1 files changed, 7 insertions, 7 deletions
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";