updated test cases for Scala Ant tasks
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26074 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
4f3d4f91c4
commit
166671da6e
|
|
@ -0,0 +1,42 @@
|
|||
README
|
||||
======
|
||||
|
||||
Test cases in directory test/files/ant/ are executed by invoking an
|
||||
Ant script whose name ends with "build.xml" (eg. "fsc001-build.xml").
|
||||
|
||||
The Scala Ant tasks fsc/scalac/scaladoc are instantiated from various
|
||||
binaries (quick/pack/latest/installed) and are executed with different
|
||||
combinations of Ant attributes/elements:
|
||||
|
||||
+---------------------------+--------------------------+
|
||||
| Attributes | Nested elements |
|
||||
------------+---------------------------+--------------------------+
|
||||
fsc001 | srcdir,classpath (1) | compilerarg |
|
||||
fsc002 | srcref,classpathref (1) | compilerarg |
|
||||
fsc003 | (2) | compilerarg,src,include |
|
||||
------------+---------------------------+--------------------------+
|
||||
scalac001 | srcdir,classpath (1) | |
|
||||
scalac002 | srcref,classpathref (1) | |
|
||||
scalac003 | (2) | src,include |
|
||||
scalac004 | deprecation,unchecked (3) | |
|
||||
------------+---------------------------+--------------------------+
|
||||
scaladoc | srcdir,classpathref | |
|
||||
------------+---------------------------+--------------------------+
|
||||
|
||||
Other attributes:
|
||||
(1) includes,destdir
|
||||
(2) destdir,classpathref
|
||||
(3) srcdir,includes,destdir,classpath
|
||||
|
||||
|
||||
The above test cases can also be run from the command prompt using one of
|
||||
the following shell commands:
|
||||
|
||||
1) For quick/pack/latest binaries (-Dbinary=quick|pack|latest)
|
||||
|
||||
$ ant -Dbinary=quick -Dproject.dir=$HOME/workspace/scala -f scalac001-build.xml
|
||||
|
||||
2) For installed binaries (-Dbinary=installed)
|
||||
|
||||
$ ant -Dbinary=installed -Dinstalled.dir=/opt/scala -f scalac001-build.xml
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Buildfile: [...]/files/ant/fsc-build.xml
|
||||
|
||||
quick.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/fsc-ant.obj
|
||||
[fsc] Compiling 1 source file to [...]/files/ant/fsc-ant.obj
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/fsc001-ant.obj
|
||||
[fsc] Compiling 1 source file to [...]/files/ant/fsc001-ant.obj
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="fsc001" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
BUILD
|
||||
============================================================================ -->
|
||||
|
||||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<pathconvert property="classpath" refid="build.classpath"/>
|
||||
<fsc
|
||||
srcdir="${source.dir}"
|
||||
includes="**/${ant.project.name}*.scala"
|
||||
destdir="${build.dir}"
|
||||
classpath="${classpath}">
|
||||
</fsc>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]) {
|
||||
println(args mkString " ")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/fsc002-ant.obj
|
||||
[fsc] Compiling 1 source file to [...]/files/ant/fsc002-ant.obj
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="fsc002" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
BUILD
|
||||
============================================================================ -->
|
||||
|
||||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<path id="source.ref">
|
||||
<pathelement location="${source.dir}"/>
|
||||
</path>
|
||||
<fsc
|
||||
srcref="source.ref"
|
||||
includes="**/${ant.project.name}*.scala"
|
||||
destdir="${build.dir}"
|
||||
classpathref="build.classpath">
|
||||
</fsc>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/fsc003-ant.obj
|
||||
[fsc] Compiling 1 source file to [...]/files/ant/fsc003-ant.obj
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="fsc003" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
BUILD
|
||||
============================================================================ -->
|
||||
|
||||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<fsc
|
||||
destdir="${build.dir}"
|
||||
classpathref="build.classpath">
|
||||
<src path="${source.dir}"/>
|
||||
<include name="**/${ant.project.name}*.scala"/>
|
||||
</fsc>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]) {
|
||||
println(args mkString " ")
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="imported" default="run" basedir=".">
|
||||
<project name="imported">
|
||||
|
||||
<!-- This file is imported by the main Ant script. -->
|
||||
|
||||
<!-- Prevents system classpath from being used -->
|
||||
<property name="build.sysclasspath" value="ignore"/>
|
||||
|
|
@ -11,11 +13,19 @@ PROPERTIES
|
|||
|
||||
<property name="source.dir" value="${basedir}"/>
|
||||
|
||||
<property file="./build.properties"/>
|
||||
<property file="${basedir}/build.properties"/>
|
||||
|
||||
<property name="build.dir" location="${source.dir}/${ant.project.name}-ant.obj"/>
|
||||
<property name="log.dir" location="${source.dir}"/>
|
||||
<property name="log.file" value="${log.dir}/${ant.project.name}-build-ant.log"/>
|
||||
<property name="project.dir" value="../../.."/>
|
||||
|
||||
<condition property="quick.binary">
|
||||
<equals arg1="${binary}" arg2="quick"/>
|
||||
</condition>
|
||||
<condition property="pack.binary">
|
||||
<equals arg1="${binary}" arg2="pack"/>
|
||||
</condition>
|
||||
<condition property="latest.binary">
|
||||
<equals arg1="${binary}" arg2="latest"/>
|
||||
</condition>
|
||||
|
|
@ -23,16 +33,15 @@ PROPERTIES
|
|||
<equals arg1="${binary}" arg2="installed"/>
|
||||
</condition>
|
||||
|
||||
<fail message="Property 'binary' must be set to either 'quick', 'lastest' or 'installed'.">
|
||||
<fail message="Property 'binary' must be set to either 'quick', 'pack', 'latest' or 'installed'.">
|
||||
<condition><not><or>
|
||||
<isset property="quick.binary"/>
|
||||
<isset property="pack.binary"/>
|
||||
<isset property="latest.binary"/>
|
||||
<isset property="installed.binary"/>
|
||||
</or></not></condition>
|
||||
</fail>
|
||||
<echo level="verbose" message="binary=${binary}"/>
|
||||
|
||||
<property name="build.dir" value="${java.io.tmpdir}/classes-${user.name}"/>
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
|
|
@ -40,25 +49,32 @@ INITIALISATION
|
|||
============================================================================ -->
|
||||
|
||||
<target name="quick.init" if="quick.binary">
|
||||
<property name="quick.dir" value="../../../build/quick"/>
|
||||
<available file="${quick.dir}" property="quick.present"/>
|
||||
<fail
|
||||
message="Quick build could not be found."
|
||||
unless="quick.present"
|
||||
/>
|
||||
<property name="quick.dir" value="${project.dir}/build/quick"/>
|
||||
<fail message="Quick build could not be found.">
|
||||
<condition><not><available file="${quick.dir}"/></not></condition>
|
||||
</fail>
|
||||
<property name="scala.dir" value="${quick.dir}"/>
|
||||
<property name="scala-library.lib" value="${scala.dir}/lib/library/"/>
|
||||
<property name="scala-compiler.lib" value="${scala.dir}/lib/compiler/"/>
|
||||
<property name="fjbg.lib" value="${scala.dir}/lib/fjbg.jar"/>
|
||||
<property name="scala-library.lib" value="${scala.dir}/classes/library/"/>
|
||||
<property name="scala-compiler.lib" value="${scala.dir}/classes/compiler/"/>
|
||||
<property name="fjbg.lib" value="${project.dir}/lib/fjbg.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="pack.init" if="pack.binary">
|
||||
<property name="pack.dir" value="${project.dir}/build/pack"/>
|
||||
<fail message="Pack build could not be found.">
|
||||
<condition><not><available file="${pack.dir}"/></not></condition>
|
||||
</fail>
|
||||
<property name="scala.dir" value="${pack.dir}"/>
|
||||
<property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
|
||||
<property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
|
||||
<property name="fjbg.lib" value=""/>
|
||||
</target>
|
||||
|
||||
<target name="latest.init" if="latest.binary">
|
||||
<property name="latest.dir" value="../../../dists/latest"/>
|
||||
<available file="${latest.dir}" property="latest.present"/>
|
||||
<fail
|
||||
message="Latest build could not be found."
|
||||
unless="latest.present"
|
||||
/>
|
||||
<property name="latest.dir" value="${project.dir}/dists/latest"/>
|
||||
<fail message="Latest build could not be found.">
|
||||
<condition><not><available file="${latest.dir}"/></not></condition>
|
||||
</fail>
|
||||
<property name="scala.dir" value="${latest.dir}"/>
|
||||
<property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
|
||||
<property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
|
||||
|
|
@ -66,55 +82,52 @@ INITIALISATION
|
|||
</target>
|
||||
|
||||
<target name="installed.init" if="installed.binary">
|
||||
<property name="installed.dir" value="/home/linuxsoft/apps/scala/share/scala"/>
|
||||
<available file="${installed.dir}" property="installed.present"/>
|
||||
<fail
|
||||
message="Installed distribution could not be found."
|
||||
unless="installed.present"
|
||||
/>
|
||||
<property name="installed.dir" value="/opt/scala"/>
|
||||
<fail message="Installed distribution could not be found.">
|
||||
<condition><not><available file="${installed.dir}"/></not></condition>
|
||||
</fail>
|
||||
<property name="scala.dir" value="${installed.dir}"/>
|
||||
<property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
|
||||
<property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
|
||||
<property name="fjbg.lib" value=""/>
|
||||
</target>
|
||||
|
||||
<target name="init" depends="quick.init, latest.init, installed.init">
|
||||
<target name="init" depends="quick.init, pack.init, latest.init, installed.init">
|
||||
<echo level="verbose" message="scala.dir=${scala.dir}"/>
|
||||
<fail message="Scala library '${scala-library.lib}' is not available">
|
||||
<condition><not><and>
|
||||
<available classname="scala.Predef"
|
||||
classpath="${scala-library.lib}"/>
|
||||
<available classname="scala.List"
|
||||
classpath="${scala-library.lib}"/>
|
||||
<available classname="scala.runtime.ObjectRef"
|
||||
classpath="${scala-library.lib}"/>
|
||||
</and></not></condition>
|
||||
</fail>
|
||||
<fail message="Scala library '${scala-compiler.lib}' is not available">
|
||||
<condition><not><and>
|
||||
<available classname="scala.tools.ant.Scalac"
|
||||
classpath="${scala-compiler.lib}"/>
|
||||
<available classname="scala.tools.nsc.Main"
|
||||
classpath="${scala-compiler.lib}"/>
|
||||
<available classname="scala.tools.util.StringOps"
|
||||
classpath="${scala-compiler.lib}"/>
|
||||
</and></not></condition>
|
||||
</fail>
|
||||
|
||||
<path id="scala.classpath">
|
||||
<pathelement location="${scala-library.lib}"/>
|
||||
<pathelement location="${scala-compiler.lib}"/>
|
||||
<pathelement location="${fjbg.lib}"/> <!-- only present for 'quick' -->
|
||||
</path>
|
||||
<taskdef resource="scala/tools/ant/antlib.xml">
|
||||
<classpath>
|
||||
<path refid="scala.classpath"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<fail message="Scala library '${scala-library.lib}' or '${scala-compiler.lib}' is missing/broken">
|
||||
<condition><not><and>
|
||||
<available classname="scala.Predef"
|
||||
classpathref="scala.classpath"/>
|
||||
<available classname="scala.Option"
|
||||
classpathref="scala.classpath"/>
|
||||
<available classname="scala.runtime.ObjectRef"
|
||||
classpathref="scala.classpath"/>
|
||||
<available classname="scala.tools.ant.Scalac"
|
||||
classpathref="scala.classpath"/>
|
||||
<available classname="scala.tools.nsc.Main"
|
||||
classpathref="scala.classpath"/>
|
||||
<available classname="scala.tools.util.StringOps"
|
||||
classpathref="scala.classpath"/>
|
||||
</and></not></condition>
|
||||
</fail>
|
||||
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="scala.classpath"/>
|
||||
|
||||
<path id="build.classpath">
|
||||
<!--<pathelement location="${scala-actors.lib}"/>-->
|
||||
<pathelement location="${scala-library.lib}"/>
|
||||
<pathelement location="${build.dir}"/>
|
||||
</path>
|
||||
|
||||
<!-- make sure the log file exists when the Ant build scripts -->
|
||||
<!-- are run manually from the command prompt -->
|
||||
<touch file="${log.file}"/>
|
||||
</target>
|
||||
|
||||
<!-- ===========================================================================
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
Buildfile: [...]/files/ant/scalac-build.xml
|
||||
|
||||
quick.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scalac-ant.obj
|
||||
[scalac] Compiling 1 source file to [...]/files/ant/scalac-ant.obj
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scalac001-ant.obj
|
||||
[scalac] Compiling 1 source file to [...]/files/ant/scalac001-ant.obj
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="scalac001" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
BUILD
|
||||
============================================================================ -->
|
||||
|
||||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<pathconvert property="classpath" refid="build.classpath"/>
|
||||
<scalac
|
||||
srcdir="${source.dir}"
|
||||
includes="**/${ant.project.name}*.scala"
|
||||
destdir="${build.dir}"
|
||||
classpath="${classpath}"
|
||||
/>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scalac002-ant.obj
|
||||
[scalac] Compiling 1 source file to [...]/files/ant/scalac002-ant.obj
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="fsc" default="run" basedir=".">
|
||||
<project name="scalac002" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
|
|
@ -11,20 +11,17 @@ BUILD
|
|||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<fsc
|
||||
srcdir="${source.dir}"
|
||||
<path id="source.ref">
|
||||
<pathelement location="${source.dir}"/>
|
||||
</path>
|
||||
<scalac
|
||||
srcref="source.ref"
|
||||
includes="**/${ant.project.name}*.scala"
|
||||
deprecation="yes" unchecked="yes"
|
||||
destdir="${build.dir}"
|
||||
classpathref="build.classpath"
|
||||
/>
|
||||
<dirname property="log.dir" file="${build.dir}"/>
|
||||
<echo level="verbose" message="log.dir=${log.dir}"/>
|
||||
<replace
|
||||
file="${log.dir}/${ant.project.name}-ant.log"
|
||||
token="${log.dir}"
|
||||
value="[...]/files/ant"
|
||||
/>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]) {
|
||||
println(args mkString " ")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scalac003-ant.obj
|
||||
[scalac] Compiling 1 source file to [...]/files/ant/scalac003-ant.obj
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="scalac003" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
<!-- ===========================================================================
|
||||
BUILD
|
||||
============================================================================ -->
|
||||
|
||||
<target name="build" depends="init">
|
||||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<scalac
|
||||
destdir="${build.dir}"
|
||||
classpathref="build.classpath">
|
||||
<src path="${source.dir}"/>
|
||||
<include name="**/${ant.project.name}*.scala"/>
|
||||
</scalac>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]) {
|
||||
println(args mkString " ")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
||||
init:
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scalac004-ant.obj
|
||||
[scalac] Compiling 1 source file to [...]/files/ant/scalac004-ant.obj
|
||||
[scalac] [...]/files/ant/scalac004.scala:9: warning: method exit in object Predef is deprecated: Use sys.exit(status) instead
|
||||
[scalac] Predef.exit(0) //deprecated in 2.9.0
|
||||
[scalac] ^
|
||||
[scalac] [...]/files/ant/scalac004.scala:6: warning: match is not exhaustive!
|
||||
[scalac] missing combination Nil
|
||||
[scalac]
|
||||
[scalac] xs match { //(xs: @unchecked) match {
|
||||
[scalac] ^
|
||||
[scalac] two warnings found
|
||||
[scalac] Compile succeeded with 2 warnings; see the compiler output for details.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="scalac" default="run" basedir=".">
|
||||
<project name="scalac004" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
|
|
@ -12,19 +12,14 @@ BUILD
|
|||
<echo level="verbose" message="build.dir=${build.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<scalac
|
||||
deprecation="yes" unchecked="yes"
|
||||
srcdir="${source.dir}"
|
||||
includes="**/${ant.project.name}*.scala"
|
||||
deprecation="yes" unchecked="yes"
|
||||
destdir="${build.dir}"
|
||||
classpathref="build.classpath"
|
||||
/>
|
||||
<dirname property="log.dir" file="${build.dir}"/>
|
||||
<echo level="verbose" message="log.dir=${log.dir}"/>
|
||||
<replace
|
||||
file="${log.dir}/${ant.project.name}-ant.log"
|
||||
token="${log.dir}"
|
||||
value="[...]/files/ant"
|
||||
/>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]) {
|
||||
val xs = List(1, 2, 3, 4)
|
||||
xs match { //(xs: @unchecked) match {
|
||||
case x::xs => println(x)
|
||||
}
|
||||
Predef.exit(0) //deprecated in 2.9.0
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
Buildfile: [...]/files/ant/scaladoc-build.xml
|
||||
|
||||
quick.init:
|
||||
|
||||
pack.init:
|
||||
|
||||
latest.init:
|
||||
|
||||
installed.init:
|
||||
|
|
@ -11,3 +12,4 @@ init:
|
|||
build:
|
||||
[mkdir] Created dir: [...]/files/ant/scaladoc-ant.obj
|
||||
[scaladoc] Documenting 1 source file to [...]/files/ant/scaladoc-ant.obj
|
||||
[scaladoc] model contains 3 documentable templates
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="scaladoc" default="run" basedir=".">
|
||||
<project name="scaladoc" default="run">
|
||||
|
||||
<import file="${basedir}/imported.xml"/>
|
||||
|
||||
|
|
@ -18,13 +18,8 @@ BUILD
|
|||
destdir="${build.dir}"
|
||||
classpathref="build.classpath"
|
||||
/>
|
||||
<dirname property="log.dir" file="${build.dir}"/>
|
||||
<echo level="verbose" message="log.dir=${log.dir}"/>
|
||||
<replace
|
||||
file="${log.dir}/${ant.project.name}-ant.log"
|
||||
token="${log.dir}"
|
||||
value="[...]/files/ant"
|
||||
/>
|
||||
<echo level="verbose" message="log.file=${log.file}"/>
|
||||
<replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package test
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]): Unit =
|
||||
Console.println(args.toList)
|
||||
def main(args: Array[String]) {
|
||||
println(args mkString " ")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
|
||||
import collection._
|
||||
|
||||
|
||||
|
||||
object Test {
|
||||
|
||||
def main(args: Array[String]) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
|
||||
|
||||
// #4608
|
||||
object Test {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
object Test {
|
||||
def main(args: Array[String]) {
|
||||
val gs = for (x <- (1 to 5)) yield { if (x % 2 == 0) List(1).seq else List(1).par }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
object Test {
|
||||
|
||||
def checkPar(sz: Int) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue