summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]debian/command-scripts/scalac0
-rwxr-xr-x[-rw-r--r--]debian/command-scripts/scaladoc0
-rwxr-xr-x[-rw-r--r--]debian/command-scripts/scalaint0
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/nsc/CompileClient.scala2
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/nsc/CompileServer.scala2
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/nsc/CompileSocket.scala2
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/nsc/transform/CleanUp.scala0
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/util/SocketConnection.scala0
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/util/SocketServer.scala0
-rw-r--r--[-rwxr-xr-x]src/compiler/scala/tools/util/StringOps.scala0
-rw-r--r--src/library/scala/runtime/RichInt.scala2
-rw-r--r--[-rwxr-xr-x]test/files/neg/bug126.scala0
-rw-r--r--[-rwxr-xr-x]test/files/neg/bug421.scala0
-rw-r--r--[-rwxr-xr-x]test/files/neg/bug588.scala0
-rw-r--r--[-rwxr-xr-x]test/files/pos/bug122.scala0
-rw-r--r--[-rwxr-xr-x]test/files/pos/bug319.scala0
-rw-r--r--[-rwxr-xr-x]test/files/pos/bug439.scala0
-rw-r--r--[-rwxr-xr-x]test/files/pos/bug595.scala0
-rw-r--r--[-rwxr-xr-x]test/files/pos/bug596.scala0
-rw-r--r--[-rwxr-xr-x]test/files/run/absoverride.scala0
-rw-r--r--[-rwxr-xr-x]test/files/run/bug429.scala0
-rw-r--r--[-rwxr-xr-x]test/files/run/bug441.scala0
-rw-r--r--[-rwxr-xr-x]test/files/script/fact.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/pos/bug305.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/pos/foo.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/pos/gosh.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/run/bug551.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/run/exc.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/run/exc1.scala0
-rw-r--r--[-rwxr-xr-x]test/pending/run/exc2.scala0
-rw-r--r--test/scalatest.bat570
31 files changed, 289 insertions, 289 deletions
diff --git a/debian/command-scripts/scalac b/debian/command-scripts/scalac
index bcfbbb62ac..bcfbbb62ac 100644..100755
--- a/debian/command-scripts/scalac
+++ b/debian/command-scripts/scalac
diff --git a/debian/command-scripts/scaladoc b/debian/command-scripts/scaladoc
index bd74c529ca..bd74c529ca 100644..100755
--- a/debian/command-scripts/scaladoc
+++ b/debian/command-scripts/scaladoc
diff --git a/debian/command-scripts/scalaint b/debian/command-scripts/scalaint
index 9b2c161432..9b2c161432 100644..100755
--- a/debian/command-scripts/scalaint
+++ b/debian/command-scripts/scalaint
diff --git a/src/compiler/scala/tools/nsc/CompileClient.scala b/src/compiler/scala/tools/nsc/CompileClient.scala
index fb3459ae1e..7e8d3b642e 100755..100644
--- a/src/compiler/scala/tools/nsc/CompileClient.scala
+++ b/src/compiler/scala/tools/nsc/CompileClient.scala
@@ -2,7 +2,7 @@
* Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
-// $Id: Main.scala 7679 2006-06-02 14:36:18 +0000 (Fri, 02 Jun 2006) odersky $
+// $Id$
package scala.tools.nsc
diff --git a/src/compiler/scala/tools/nsc/CompileServer.scala b/src/compiler/scala/tools/nsc/CompileServer.scala
index 3f058d7392..ec45fa15f6 100755..100644
--- a/src/compiler/scala/tools/nsc/CompileServer.scala
+++ b/src/compiler/scala/tools/nsc/CompileServer.scala
@@ -2,7 +2,7 @@
* Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
-// $Id: Main.scala 7679 2006-06-02 14:36:18 +0000 (Fri, 02 Jun 2006) odersky $
+// $Id$
package scala.tools.nsc
import scala.tools.util.{SocketServer, StringOps}
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala
index 213c65e677..ea3e8e64d1 100755..100644
--- a/src/compiler/scala/tools/nsc/CompileSocket.scala
+++ b/src/compiler/scala/tools/nsc/CompileSocket.scala
@@ -2,7 +2,7 @@
* Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
-// $Id: Main.scala 7679 2006-06-02 14:36:18 +0000 (Fri, 02 Jun 2006) odersky $
+// $Id$
package scala.tools.nsc
import java.io._
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
index 6c02ea65be..6c02ea65be 100755..100644
--- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala
+++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
diff --git a/src/compiler/scala/tools/util/SocketConnection.scala b/src/compiler/scala/tools/util/SocketConnection.scala
index 531caaf30d..531caaf30d 100755..100644
--- a/src/compiler/scala/tools/util/SocketConnection.scala
+++ b/src/compiler/scala/tools/util/SocketConnection.scala
diff --git a/src/compiler/scala/tools/util/SocketServer.scala b/src/compiler/scala/tools/util/SocketServer.scala
index 7a65290dcc..7a65290dcc 100755..100644
--- a/src/compiler/scala/tools/util/SocketServer.scala
+++ b/src/compiler/scala/tools/util/SocketServer.scala
diff --git a/src/compiler/scala/tools/util/StringOps.scala b/src/compiler/scala/tools/util/StringOps.scala
index 0c2333ca22..0c2333ca22 100755..100644
--- a/src/compiler/scala/tools/util/StringOps.scala
+++ b/src/compiler/scala/tools/util/StringOps.scala
diff --git a/src/library/scala/runtime/RichInt.scala b/src/library/scala/runtime/RichInt.scala
index 8843388c44..178185b14b 100644
--- a/src/library/scala/runtime/RichInt.scala
+++ b/src/library/scala/runtime/RichInt.scala
@@ -6,7 +6,7 @@
** |/ **
\* */
-// $Id: RichInt.scala 7625 2006-05-30 10:47:58 +0000 (Tue, 30 May 2006) odersky $
+// $Id$
package scala.runtime
final class RichInt(x: Int) {
diff --git a/test/files/neg/bug126.scala b/test/files/neg/bug126.scala
index 75c10e608a..75c10e608a 100755..100644
--- a/test/files/neg/bug126.scala
+++ b/test/files/neg/bug126.scala
diff --git a/test/files/neg/bug421.scala b/test/files/neg/bug421.scala
index 3e014b7500..3e014b7500 100755..100644
--- a/test/files/neg/bug421.scala
+++ b/test/files/neg/bug421.scala
diff --git a/test/files/neg/bug588.scala b/test/files/neg/bug588.scala
index bbb79ed79e..bbb79ed79e 100755..100644
--- a/test/files/neg/bug588.scala
+++ b/test/files/neg/bug588.scala
diff --git a/test/files/pos/bug122.scala b/test/files/pos/bug122.scala
index cbfdb64def..cbfdb64def 100755..100644
--- a/test/files/pos/bug122.scala
+++ b/test/files/pos/bug122.scala
diff --git a/test/files/pos/bug319.scala b/test/files/pos/bug319.scala
index eed25eb84c..eed25eb84c 100755..100644
--- a/test/files/pos/bug319.scala
+++ b/test/files/pos/bug319.scala
diff --git a/test/files/pos/bug439.scala b/test/files/pos/bug439.scala
index f3191c72fa..f3191c72fa 100755..100644
--- a/test/files/pos/bug439.scala
+++ b/test/files/pos/bug439.scala
diff --git a/test/files/pos/bug595.scala b/test/files/pos/bug595.scala
index 44124c90c9..44124c90c9 100755..100644
--- a/test/files/pos/bug595.scala
+++ b/test/files/pos/bug595.scala
diff --git a/test/files/pos/bug596.scala b/test/files/pos/bug596.scala
index b1b5471b2f..b1b5471b2f 100755..100644
--- a/test/files/pos/bug596.scala
+++ b/test/files/pos/bug596.scala
diff --git a/test/files/run/absoverride.scala b/test/files/run/absoverride.scala
index cf14ff475b..cf14ff475b 100755..100644
--- a/test/files/run/absoverride.scala
+++ b/test/files/run/absoverride.scala
diff --git a/test/files/run/bug429.scala b/test/files/run/bug429.scala
index b2cc8128c0..b2cc8128c0 100755..100644
--- a/test/files/run/bug429.scala
+++ b/test/files/run/bug429.scala
diff --git a/test/files/run/bug441.scala b/test/files/run/bug441.scala
index d90e872baa..d90e872baa 100755..100644
--- a/test/files/run/bug441.scala
+++ b/test/files/run/bug441.scala
diff --git a/test/files/script/fact.scala b/test/files/script/fact.scala
index 1ba70dcc6c..1ba70dcc6c 100755..100644
--- a/test/files/script/fact.scala
+++ b/test/files/script/fact.scala
diff --git a/test/pending/pos/bug305.scala b/test/pending/pos/bug305.scala
index 3e7e8c60f4..3e7e8c60f4 100755..100644
--- a/test/pending/pos/bug305.scala
+++ b/test/pending/pos/bug305.scala
diff --git a/test/pending/pos/foo.scala b/test/pending/pos/foo.scala
index 8b45addbd5..8b45addbd5 100755..100644
--- a/test/pending/pos/foo.scala
+++ b/test/pending/pos/foo.scala
diff --git a/test/pending/pos/gosh.scala b/test/pending/pos/gosh.scala
index c4cd3df80b..c4cd3df80b 100755..100644
--- a/test/pending/pos/gosh.scala
+++ b/test/pending/pos/gosh.scala
diff --git a/test/pending/run/bug551.scala b/test/pending/run/bug551.scala
index ffa36d7cb0..ffa36d7cb0 100755..100644
--- a/test/pending/run/bug551.scala
+++ b/test/pending/run/bug551.scala
diff --git a/test/pending/run/exc.scala b/test/pending/run/exc.scala
index 26f80412c0..26f80412c0 100755..100644
--- a/test/pending/run/exc.scala
+++ b/test/pending/run/exc.scala
diff --git a/test/pending/run/exc1.scala b/test/pending/run/exc1.scala
index 48fc084dda..48fc084dda 100755..100644
--- a/test/pending/run/exc1.scala
+++ b/test/pending/run/exc1.scala
diff --git a/test/pending/run/exc2.scala b/test/pending/run/exc2.scala
index 8adf9b4a37..8adf9b4a37 100755..100644
--- a/test/pending/run/exc2.scala
+++ b/test/pending/run/exc2.scala
diff --git a/test/scalatest.bat b/test/scalatest.bat
index b8ebfa99bc..5aea0e326b 100644
--- a/test/scalatest.bat
+++ b/test/scalatest.bat
@@ -1,285 +1,285 @@
-@echo off
-
-rem ##########################################################################
-rem # Copyright (c) 2002-06 LAMP/EPFL
-rem #
-rem # This is free software; see the distribution for copying conditions.
-rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-rem # PARTICULAR PURPOSE.
-rem ##########################################################################
-
-if "%OS%"=="Windows_NT" (
- @setlocal
- call :set_home
-) else (
- set _SCALA_HOME=%SCALA_HOME%
- if "%_SCALA_HOME%"=="" goto err_home
-)
-
-set _JAVACMD=%JAVACMD%
-if "%_JAVACMD%"=="" set _JAVACMD=java
-
-set _NORUN=
-set _TYPE=auto
-set _SHOWLOG=
-set _SHOWDIFF=
-set _FAILED=
-
-set _ARGS=
-:loop
-rem Argument %1 may contain quotes so we use parentheses here
-if (%1)==() goto exec
-if (%1)==(--auto) set _TYPE=auto & goto next
-if (%1)==(--run) set _TYPE=run & goto next
-if (%1)==(--jvm) set _TYPE=jvm & goto next
-if (%1)==(--pos) set _TYPE=pos & goto next
-if (%1)==(--neg) set _TYPE=neg & goto next
-if (%1)==(--msil) set _TYPE=msil & goto next
-if (%1)==(--no-run) set _NORUN=1 & goto next
-if (%1)==(--show-log) set _SHOWLOG=1 & goto next
-if (%1)==(--show-diff) set _SHOWDIFF=1 & goto next
-if (%1)==(--failed) set _FAILED=1 & goto next
-if (%1)==(--help) call :prt_help & goto :eof
-if (%1)==(-h) call :prt_help & goto :eof
-if (%1)==(-?) call :prt_help & goto :eof
-if (%1)==(--version) call :prt_version & goto :eof
-if (%1)==(-v) call :prt_version & goto :eof
-call :chk_option %1
-if errorlevel 0 goto err_opt
-set _ARGS=%_ARGS% %1
-:next
-shift
-goto loop
-
-:exec
-set _SCALA=%_BINDIR%scala
-set _SCALAC=%_BINDIR%scalac -encoding iso-8859-1
-set _SCALAP=%_BINDIR%scalap
-set _DIFF=%_BINDIR%diff.exe --text --strip-trailing-cr
-
-set _SRCDIR=%_SCALA_HOME%\misc\scala-test\files
-set _OBJDIR=
-set _TMPDIR=%TEMP%
-
-if not "%_OBJDIR%"=="" (
- if not exist "%_OBJDIR%" mkdir "%_OBJDIR%"
-)
-if not "%_TMPDIR%"=="" (
- if not exist "%_TMPDIR%" mkdir "%_TMPDIR%"
-)
-
-call :prt_dir "Source directory is :" "%_SRCDIR%"
-call :prt_dir "Scala binaries are in:" "%_BINDIR%"
-call :set_version
-call :prt_dir "Java runtime is :" "%_JVM_VERSION%"
-
-set _FILES_POS=
-set _FILES_RUN=
-set _FILES_JVM=
-set _FILES_NEG=
-set _FILES_MSIL=
-
-if %_TYPE%==pos (
- set _FILES_POS=%_SRCDIR%\pos
-) else if %_TYPE%==run (
- set _FILES_RUN=%_SRCDIR%\run
-) else if %_TYPE%==jvm (
- set _FILES_JVM=%_SRCDIR%\jvm
- set _FILES_RUN=%_SRCDIR%\run
-) else if %_TYPE%==neg (
- set _FILES_NEG=%_SRCDIR%\neg
-) else if %_TYPE%==msil (
- set _FILES_MSIL=%_SRCDIR%\msil
-) else if %_TYPE%==auto (
- set _FILES_POS=%_SRCDIR%\pos
- set _FILES_NEG=%_SRCDIR%\neg
- set _FILES_JVM=%_SRCDIR%\jvm
- set _FILES_RUN=%_SRCDIR%\run
-) else (
- goto err_test
-)
-:start
-call :chk_all
-goto end
-
-rem ##########################################################################
-rem # subroutines
-rem # NB. goto/call commands use only the first 8 characters of a label
-
-:prt_dir
- echo %~1 %~2
- goto :eof
-
-:prt_header
- echo.
- echo %~1
- goto :eof
-
-:prt_help
- echo Usage: scalatest [OPTION]...
- echo.
- echo --auto use filenames to select the test to run
- echo --run next files test the interpreter and all backends
- echo --jvm next files test the JVM backend
- echo --pos next files test a compilation success
- echo --neg next files test a compilation failure
- echo --msil next files test the .NET backend
- echo --no-run run no test, use results of last run
- echo --show-log show output of failed tests
- echo --show-diff show differences between actual and expected output
- echo --failed test only files that failed last time
- echo --help, -h, -? display this help and exit
- echo --version, -v output version information and exit
- goto :eof
-
-:prt_version
- echo Scala test suite 0.9.1 -- (c) 2002-2006 LAMP/EPFL
- goto :eof
-
-:prt_status
- set _MSG=testing: [...]\%~1\%2
- if not "%_STATUS%"=="0" goto failed
- set /a _CNT_SUCCESS=_CNT_SUCCESS+1
- echo %_MSG% [OK]
- goto :eof
- :failed
- set /a _CNT_FAILURE=_CNT_FAILURE+1
- echo %_MSG% [FAILED]
- if not "%_SHOWLOG%"=="" type %_LOGFILE%
- goto :eof
-
-rem Variable "%~dps0" works on WinXP SP2 or newer
-rem (see http://support.microsoft.com/?kbid=833431)
-rem set _SCALA_HOME=%~dps0..
-:set_home
- set _BINDIR=
- for %%i in (%~sf0) do set _BINDIR=%_BINDIR%%%~dpsi
- set _SCALA_HOME=%_BINDIR%..
- goto :eof
-
-:set_version
- set _TMPFILE=%_TMPDIR%\.version
- %_JAVACMD% -version 2> %_TMPFILE%
- for /f "skip=2 tokens=*" %%f in (%_TMPFILE%) do @set _VERSION=%%f
- set _JVM_VERSION=%_VERSION%
- goto :eof
-
-:chk_option
- echo %~1 | findstr /r /c:"-.*" 1>NUL
- goto :eof
-
-rem Tests a compilation success.
-:test_pos
- rmdir /s/q %_DSTBASE%.obj 2>NUL
- mkdir %_DSTBASE%.obj
- call %_SCALAC% -d %_DSTBASE%.obj %1 1>NUL 2>NUL
- if errorlevel 1 goto status_pos
- set _STATUS=0
- goto next_pos
- :status_pos
- set _STATUS=1
- :next_pos
- rmdir /s/q %_DSTBASE%.obj
- goto :eof
-
-rem Tests a compilation failure.
-:test_neg
- rmdir /s/q %_DSTBASE%.obj 2>NUL
- mkdir %_DSTBASE%.obj
- call %_SCALAC% -d %_DSTBASE%.obj %1 1>NUL 2>NUL
- if errorlevel 1 goto status_neg
- set _STATUS=1
- goto next_neg
- :status_neg
- set _STATUS=0
- :next_neg
- rmdir /s/q %_DSTBASE%.obj
- goto :eof
-
-rem Tests the JVM backend.
-:test_jvm
- rmdir /s/q %_DSTBASE%.obj 2>NUL
- mkdir %_DSTBASE%.obj
- call %_SCALAC% -d %_DSTBASE%.obj %1 2>NUL
- if errorlevel 1 goto status_jvm
- call %_SCALA% -cp %_DSTBASE%.obj Test "jvm" 1>%_LOGFILE% 2>NUL
- if errorlevel 1 goto status_jvm
- set _STATUS=0
- goto next_jvm
- :status_jvm
- set _STATUS=1
- :next_jvm
- rmdir /s/q %_DSTBASE%.obj
- goto :eof
-
-:chk_test
- if "%_OBJDIR%"=="" (
- set _DSTDIR=%_SRCDIR%
- ) else (
- set _DSTDIR=%_OBJDIR%
- )
- set _TESTNAME=%~n1
- set _DSTBASE=%_DSTDIR%\%_TESTNAME%-%_KIND%
- set _LOGFILE=%_DSTBASE%.log
-
- if not '%_HEADER%'=='' call :prt_header %_HEADER% & set _HEADER=
-
- if %_KIND%=="jvm" call :test_jvm %1 & goto status
- if %_KIND%=="pos" call :test_pos %1 & goto status
- if %_KIND%=="neg" call :test_neg %1 & goto status
- goto :eof
- :status
- call :prt_status %_KIND% %~nx1
- del /s/q %_LOGFILE% 1>NUL
- goto :eof
-
-:chk_file
- set _CNT_SUCCESS=0
- set _CNT_FAILURE=0
- for %%f in (%1\*.scala) do call :chk_test %%f
- set /a _CNT_TOTAL=_CNT_SUCCESS+_CNT_FAILURE
- if "%_CNT_FAILURE%"=="0" goto success
- echo %_CNT_FAILURE% of %_CNT_TOTAL% tests failed
- goto :eof
- :success
- echo All of %_CNT_TOTAL% tests were successful
- goto :eof
-
-:chk_kind
- set _HEADER=%1
- shift
- set _KIND=%1
- shift
- :loop_kind
- if "%1"=="" goto done
- call :chk_file %1
- shift
- goto loop_kind
- :done
- goto :eof
-
-rem Checks everything.
-:chk_all
- call :chk_kind "Testing JVM backend" "jvm" %_FILES_RUN% %_FILES_JVM%
- call :chk_kind "Testing compiler (on files whose compilation should succeed)" "pos" %_FILES_POS%
- call :chk_kind "Testing compiler (on files whose compilation should fail)" "neg" %_FILES_NEG%
- call :chk_kind "Testing .NET backend" "msil" %_FILES_MSIL%
- goto :eof
-
-rem ##########################################################################
-rem # errors
-
-:err_home
-echo ERROR: Windows NT or newer is required to run this batch command.
-goto end
-
-:err_test
-echo ERROR: Illegal test type %_TYPE%.
-goto end
-
-:err_opt
-echo ERROR: Unknown option %1
-goto end
-
-:end
-if "%OS%"=="Windows_NT" @endlocal
+@echo off
+
+rem ##########################################################################
+rem # Copyright (c) 2002-06 LAMP/EPFL
+rem #
+rem # This is free software; see the distribution for copying conditions.
+rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+rem # PARTICULAR PURPOSE.
+rem ##########################################################################
+
+if "%OS%"=="Windows_NT" (
+ @setlocal
+ call :set_home
+) else (
+ set _SCALA_HOME=%SCALA_HOME%
+ if "%_SCALA_HOME%"=="" goto err_home
+)
+
+set _JAVACMD=%JAVACMD%
+if "%_JAVACMD%"=="" set _JAVACMD=java
+
+set _NORUN=
+set _TYPE=auto
+set _SHOWLOG=
+set _SHOWDIFF=
+set _FAILED=
+
+set _ARGS=
+:loop
+rem Argument %1 may contain quotes so we use parentheses here
+if (%1)==() goto exec
+if (%1)==(--auto) set _TYPE=auto & goto next
+if (%1)==(--run) set _TYPE=run & goto next
+if (%1)==(--jvm) set _TYPE=jvm & goto next
+if (%1)==(--pos) set _TYPE=pos & goto next
+if (%1)==(--neg) set _TYPE=neg & goto next
+if (%1)==(--msil) set _TYPE=msil & goto next
+if (%1)==(--no-run) set _NORUN=1 & goto next
+if (%1)==(--show-log) set _SHOWLOG=1 & goto next
+if (%1)==(--show-diff) set _SHOWDIFF=1 & goto next
+if (%1)==(--failed) set _FAILED=1 & goto next
+if (%1)==(--help) call :prt_help & goto :eof
+if (%1)==(-h) call :prt_help & goto :eof
+if (%1)==(-?) call :prt_help & goto :eof
+if (%1)==(--version) call :prt_version & goto :eof
+if (%1)==(-v) call :prt_version & goto :eof
+call :chk_option %1
+if errorlevel 0 goto err_opt
+set _ARGS=%_ARGS% %1
+:next
+shift
+goto loop
+
+:exec
+set _SCALA=%_BINDIR%scala
+set _SCALAC=%_BINDIR%scalac -encoding iso-8859-1
+set _SCALAP=%_BINDIR%scalap
+set _DIFF=%_BINDIR%diff.exe --text --strip-trailing-cr
+
+set _SRCDIR=%_SCALA_HOME%\misc\scala-test\files
+set _OBJDIR=
+set _TMPDIR=%TEMP%
+
+if not "%_OBJDIR%"=="" (
+ if not exist "%_OBJDIR%" mkdir "%_OBJDIR%"
+)
+if not "%_TMPDIR%"=="" (
+ if not exist "%_TMPDIR%" mkdir "%_TMPDIR%"
+)
+
+call :prt_dir "Source directory is :" "%_SRCDIR%"
+call :prt_dir "Scala binaries are in:" "%_BINDIR%"
+call :set_version
+call :prt_dir "Java runtime is :" "%_JVM_VERSION%"
+
+set _FILES_POS=
+set _FILES_RUN=
+set _FILES_JVM=
+set _FILES_NEG=
+set _FILES_MSIL=
+
+if %_TYPE%==pos (
+ set _FILES_POS=%_SRCDIR%\pos
+) else if %_TYPE%==run (
+ set _FILES_RUN=%_SRCDIR%\run
+) else if %_TYPE%==jvm (
+ set _FILES_JVM=%_SRCDIR%\jvm
+ set _FILES_RUN=%_SRCDIR%\run
+) else if %_TYPE%==neg (
+ set _FILES_NEG=%_SRCDIR%\neg
+) else if %_TYPE%==msil (
+ set _FILES_MSIL=%_SRCDIR%\msil
+) else if %_TYPE%==auto (
+ set _FILES_POS=%_SRCDIR%\pos
+ set _FILES_NEG=%_SRCDIR%\neg
+ set _FILES_JVM=%_SRCDIR%\jvm
+ set _FILES_RUN=%_SRCDIR%\run
+) else (
+ goto err_test
+)
+:start
+call :chk_all
+goto end
+
+rem ##########################################################################
+rem # subroutines
+rem # NB. goto/call commands use only the first 8 characters of a label
+
+:prt_dir
+ echo %~1 %~2
+ goto :eof
+
+:prt_header
+ echo.
+ echo %~1
+ goto :eof
+
+:prt_help
+ echo Usage: scalatest [OPTION]...
+ echo.
+ echo --auto use filenames to select the test to run
+ echo --run next files test the interpreter and all backends
+ echo --jvm next files test the JVM backend
+ echo --pos next files test a compilation success
+ echo --neg next files test a compilation failure
+ echo --msil next files test the .NET backend
+ echo --no-run run no test, use results of last run
+ echo --show-log show output of failed tests
+ echo --show-diff show differences between actual and expected output
+ echo --failed test only files that failed last time
+ echo --help, -h, -? display this help and exit
+ echo --version, -v output version information and exit
+ goto :eof
+
+:prt_version
+ echo Scala test suite 0.9.1 -- (c) 2002-2006 LAMP/EPFL
+ goto :eof
+
+:prt_status
+ set _MSG=testing: [...]\%~1\%2
+ if not "%_STATUS%"=="0" goto failed
+ set /a _CNT_SUCCESS=_CNT_SUCCESS+1
+ echo %_MSG% [OK]
+ goto :eof
+ :failed
+ set /a _CNT_FAILURE=_CNT_FAILURE+1
+ echo %_MSG% [FAILED]
+ if not "%_SHOWLOG%"=="" type %_LOGFILE%
+ goto :eof
+
+rem Variable "%~dps0" works on WinXP SP2 or newer
+rem (see http://support.microsoft.com/?kbid=833431)
+rem set _SCALA_HOME=%~dps0..
+:set_home
+ set _BINDIR=
+ for %%i in (%~sf0) do set _BINDIR=%_BINDIR%%%~dpsi
+ set _SCALA_HOME=%_BINDIR%..
+ goto :eof
+
+:set_version
+ set _TMPFILE=%_TMPDIR%\.version
+ %_JAVACMD% -version 2> %_TMPFILE%
+ for /f "skip=2 tokens=*" %%f in (%_TMPFILE%) do @set _VERSION=%%f
+ set _JVM_VERSION=%_VERSION%
+ goto :eof
+
+:chk_option
+ echo %~1 | findstr /r /c:"-.*" 1>NUL
+ goto :eof
+
+rem Tests a compilation success.
+:test_pos
+ rmdir /s/q %_DSTBASE%.obj 2>NUL
+ mkdir %_DSTBASE%.obj
+ call %_SCALAC% -d %_DSTBASE%.obj %1 1>NUL 2>NUL
+ if errorlevel 1 goto status_pos
+ set _STATUS=0
+ goto next_pos
+ :status_pos
+ set _STATUS=1
+ :next_pos
+ rmdir /s/q %_DSTBASE%.obj
+ goto :eof
+
+rem Tests a compilation failure.
+:test_neg
+ rmdir /s/q %_DSTBASE%.obj 2>NUL
+ mkdir %_DSTBASE%.obj
+ call %_SCALAC% -d %_DSTBASE%.obj %1 1>NUL 2>NUL
+ if errorlevel 1 goto status_neg
+ set _STATUS=1
+ goto next_neg
+ :status_neg
+ set _STATUS=0
+ :next_neg
+ rmdir /s/q %_DSTBASE%.obj
+ goto :eof
+
+rem Tests the JVM backend.
+:test_jvm
+ rmdir /s/q %_DSTBASE%.obj 2>NUL
+ mkdir %_DSTBASE%.obj
+ call %_SCALAC% -d %_DSTBASE%.obj %1 2>NUL
+ if errorlevel 1 goto status_jvm
+ call %_SCALA% -cp %_DSTBASE%.obj Test "jvm" 1>%_LOGFILE% 2>NUL
+ if errorlevel 1 goto status_jvm
+ set _STATUS=0
+ goto next_jvm
+ :status_jvm
+ set _STATUS=1
+ :next_jvm
+ rmdir /s/q %_DSTBASE%.obj
+ goto :eof
+
+:chk_test
+ if "%_OBJDIR%"=="" (
+ set _DSTDIR=%_SRCDIR%
+ ) else (
+ set _DSTDIR=%_OBJDIR%
+ )
+ set _TESTNAME=%~n1
+ set _DSTBASE=%_DSTDIR%\%_TESTNAME%-%_KIND%
+ set _LOGFILE=%_DSTBASE%.log
+
+ if not '%_HEADER%'=='' call :prt_header %_HEADER% & set _HEADER=
+
+ if %_KIND%=="jvm" call :test_jvm %1 & goto status
+ if %_KIND%=="pos" call :test_pos %1 & goto status
+ if %_KIND%=="neg" call :test_neg %1 & goto status
+ goto :eof
+ :status
+ call :prt_status %_KIND% %~nx1
+ del /s/q %_LOGFILE% 1>NUL
+ goto :eof
+
+:chk_file
+ set _CNT_SUCCESS=0
+ set _CNT_FAILURE=0
+ for %%f in (%1\*.scala) do call :chk_test %%f
+ set /a _CNT_TOTAL=_CNT_SUCCESS+_CNT_FAILURE
+ if "%_CNT_FAILURE%"=="0" goto success
+ echo %_CNT_FAILURE% of %_CNT_TOTAL% tests failed
+ goto :eof
+ :success
+ echo All of %_CNT_TOTAL% tests were successful
+ goto :eof
+
+:chk_kind
+ set _HEADER=%1
+ shift
+ set _KIND=%1
+ shift
+ :loop_kind
+ if "%1"=="" goto done
+ call :chk_file %1
+ shift
+ goto loop_kind
+ :done
+ goto :eof
+
+rem Checks everything.
+:chk_all
+ call :chk_kind "Testing JVM backend" "jvm" %_FILES_RUN% %_FILES_JVM%
+ call :chk_kind "Testing compiler (on files whose compilation should succeed)" "pos" %_FILES_POS%
+ call :chk_kind "Testing compiler (on files whose compilation should fail)" "neg" %_FILES_NEG%
+ call :chk_kind "Testing .NET backend" "msil" %_FILES_MSIL%
+ goto :eof
+
+rem ##########################################################################
+rem # errors
+
+:err_home
+echo ERROR: Windows NT or newer is required to run this batch command.
+goto end
+
+:err_test
+echo ERROR: Illegal test type %_TYPE%.
+goto end
+
+:err_opt
+echo ERROR: Unknown option %1
+goto end
+
+:end
+if "%OS%"=="Windows_NT" @endlocal