diff options
Diffstat (limited to 'test/files/ant')
26 files changed, 0 insertions, 588 deletions
diff --git a/test/files/ant/README b/test/files/ant/README deleted file mode 100644 index 8cd8745970..0000000000 --- a/test/files/ant/README +++ /dev/null @@ -1,42 +0,0 @@ -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 - diff --git a/test/files/ant/fsc001-build.check b/test/files/ant/fsc001-build.check deleted file mode 100644 index b5141f587b..0000000000 --- a/test/files/ant/fsc001-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/fsc001-build.xml b/test/files/ant/fsc001-build.xml deleted file mode 100644 index 0130f3615c..0000000000 --- a/test/files/ant/fsc001-build.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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> - diff --git a/test/files/ant/fsc001.scala b/test/files/ant/fsc001.scala deleted file mode 100644 index 6ede5981ce..0000000000 --- a/test/files/ant/fsc001.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -object Main { - def main(args: Array[String]) { - println(args mkString " ") - } -} diff --git a/test/files/ant/fsc002-build.check b/test/files/ant/fsc002-build.check deleted file mode 100644 index 0c9c30dbfa..0000000000 --- a/test/files/ant/fsc002-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/fsc002-build.xml b/test/files/ant/fsc002-build.xml deleted file mode 100644 index db91070fa1..0000000000 --- a/test/files/ant/fsc002-build.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?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> - diff --git a/test/files/ant/fsc002.scala b/test/files/ant/fsc002.scala deleted file mode 100644 index 47131daac6..0000000000 --- a/test/files/ant/fsc002.scala +++ /dev/null @@ -1,6 +0,0 @@ -package test - -object Main { - def main(args: Array[String]): Unit = - Console.println(args.toList) -} diff --git a/test/files/ant/fsc003-build.check b/test/files/ant/fsc003-build.check deleted file mode 100644 index c8c9ed857e..0000000000 --- a/test/files/ant/fsc003-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/fsc003-build.xml b/test/files/ant/fsc003-build.xml deleted file mode 100644 index 5f71770bf2..0000000000 --- a/test/files/ant/fsc003-build.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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> - diff --git a/test/files/ant/fsc003.scala b/test/files/ant/fsc003.scala deleted file mode 100644 index 6ede5981ce..0000000000 --- a/test/files/ant/fsc003.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -object Main { - def main(args: Array[String]) { - println(args mkString " ") - } -} diff --git a/test/files/ant/imported.xml b/test/files/ant/imported.xml deleted file mode 100644 index 5a4dfc319b..0000000000 --- a/test/files/ant/imported.xml +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project name="imported"> - - <!-- This file is imported by the main Ant script. --> - - <!-- Prevents system classpath from being used --> - <property name="build.sysclasspath" value="ignore"/> - -<!-- =========================================================================== -PROPERTIES -============================================================================ --> - - <property name="source.dir" value="${basedir}"/> - - <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> - <condition property="installed.binary"> - <equals arg1="${binary}" arg2="installed"/> - </condition> - - <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}"/> - <echo level="verbose" message="build.dir=${build.dir}"/> - -<!-- =========================================================================== -INITIALISATION -============================================================================ --> - - <target name="quick.init" if="quick.binary"> - <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}/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="${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"/> - <property name="fjbg.lib" value=""/> - </target> - - <target name="installed.init" if="installed.binary"> - <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, pack.init, latest.init, installed.init"> - <echo level="verbose" message="scala.dir=${scala.dir}"/> - - <path id="scala.classpath"> - <pathelement location="${scala-library.lib}"/> - <pathelement location="${scala-compiler.lib}"/> - <pathelement location="${fjbg.lib}"/> <!-- only present for 'quick' --> - </path> - - <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> - -<!-- =========================================================================== -RUN -============================================================================ --> - - <target name="run" depends="build, clean"/> - -<!-- =========================================================================== -CLEAN -============================================================================ --> - - <macrodef name="remove"> - <attribute name="dir"/> - <sequential> - <delete dir="@{dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/> - </sequential> - </macrodef> - - <target name="clean"> - <remove dir="${build.dir}"/> - </target> - -</project> - diff --git a/test/files/ant/scalac001-build.check b/test/files/ant/scalac001-build.check deleted file mode 100644 index 05a43ba572..0000000000 --- a/test/files/ant/scalac001-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/scalac001-build.xml b/test/files/ant/scalac001-build.xml deleted file mode 100644 index 4ec7fc833c..0000000000 --- a/test/files/ant/scalac001-build.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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> - diff --git a/test/files/ant/scalac001.scala b/test/files/ant/scalac001.scala deleted file mode 100644 index 47131daac6..0000000000 --- a/test/files/ant/scalac001.scala +++ /dev/null @@ -1,6 +0,0 @@ -package test - -object Main { - def main(args: Array[String]): Unit = - Console.println(args.toList) -} diff --git a/test/files/ant/scalac002-build.check b/test/files/ant/scalac002-build.check deleted file mode 100644 index e7b3670a0c..0000000000 --- a/test/files/ant/scalac002-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/scalac002-build.xml b/test/files/ant/scalac002-build.xml deleted file mode 100644 index 07628afa64..0000000000 --- a/test/files/ant/scalac002-build.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project name="scalac002" 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> - <scalac - srcref="source.ref" - includes="**/${ant.project.name}*.scala" - destdir="${build.dir}" - classpathref="build.classpath" - /> - <echo level="verbose" message="log.file=${log.file}"/> - <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/> - </target> - -</project> - diff --git a/test/files/ant/scalac002.scala b/test/files/ant/scalac002.scala deleted file mode 100644 index 6ede5981ce..0000000000 --- a/test/files/ant/scalac002.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -object Main { - def main(args: Array[String]) { - println(args mkString " ") - } -} diff --git a/test/files/ant/scalac003-build.check b/test/files/ant/scalac003-build.check deleted file mode 100644 index 7b0d3367ed..0000000000 --- a/test/files/ant/scalac003-build.check +++ /dev/null @@ -1,14 +0,0 @@ - -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 diff --git a/test/files/ant/scalac003-build.xml b/test/files/ant/scalac003-build.xml deleted file mode 100644 index 1d70aa115e..0000000000 --- a/test/files/ant/scalac003-build.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?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> - diff --git a/test/files/ant/scalac003.scala b/test/files/ant/scalac003.scala deleted file mode 100644 index 6ede5981ce..0000000000 --- a/test/files/ant/scalac003.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -object Main { - def main(args: Array[String]) { - println(args mkString " ") - } -} diff --git a/test/files/ant/scalac004-build.check b/test/files/ant/scalac004-build.check deleted file mode 100644 index ffe9e8c79a..0000000000 --- a/test/files/ant/scalac004-build.check +++ /dev/null @@ -1,24 +0,0 @@ - -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. diff --git a/test/files/ant/scalac004-build.xml b/test/files/ant/scalac004-build.xml deleted file mode 100644 index 66c19a39fb..0000000000 --- a/test/files/ant/scalac004-build.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project name="scalac004" 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 - deprecation="yes" unchecked="yes" - srcdir="${source.dir}" - includes="**/${ant.project.name}*.scala" - destdir="${build.dir}" - classpathref="build.classpath" - /> - <echo level="verbose" message="log.file=${log.file}"/> - <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/> - </target> - -</project> - diff --git a/test/files/ant/scalac004.scala b/test/files/ant/scalac004.scala deleted file mode 100644 index 66b2ba7985..0000000000 --- a/test/files/ant/scalac004.scala +++ /dev/null @@ -1,11 +0,0 @@ -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 - } -} diff --git a/test/files/ant/scaladoc-build.check b/test/files/ant/scaladoc-build.check deleted file mode 100644 index 1c82456ad0..0000000000 --- a/test/files/ant/scaladoc-build.check +++ /dev/null @@ -1,15 +0,0 @@ - -quick.init: - -pack.init: - -latest.init: - -installed.init: - -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 diff --git a/test/files/ant/scaladoc-build.xml b/test/files/ant/scaladoc-build.xml deleted file mode 100644 index fb4dc6fe69..0000000000 --- a/test/files/ant/scaladoc-build.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project name="scaladoc" 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}"/> - <scaladoc - srcdir="${source.dir}" - includes="**/${ant.project.name}*.scala" - deprecation="yes" unchecked="yes" - destdir="${build.dir}" - classpathref="build.classpath" - /> - <echo level="verbose" message="log.file=${log.file}"/> - <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/> - </target> - -</project> - diff --git a/test/files/ant/scaladoc.scala b/test/files/ant/scaladoc.scala deleted file mode 100644 index 6ede5981ce..0000000000 --- a/test/files/ant/scaladoc.scala +++ /dev/null @@ -1,7 +0,0 @@ -package test - -object Main { - def main(args: Array[String]) { - println(args mkString " ") - } -} |