summaryrefslogtreecommitdiff
path: root/test/ant
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-09-11 13:44:40 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-09-12 08:31:02 -0400
commitfdcda3313da5415b62bff9341081dd266ca76cb3 (patch)
treec7a34b405b53037dcd98a0321b6c0cd3ff752d17 /test/ant
parent13002fea6a45e3c51cbcbf1775fde8e4ab3e59d9 (diff)
downloadscala-fdcda3313da5415b62bff9341081dd266ca76cb3.tar.gz
scala-fdcda3313da5415b62bff9341081dd266ca76cb3.tar.bz2
scala-fdcda3313da5415b62bff9341081dd266ca76cb3.zip
Fixes SI-6268. Review by @paulp and @lrytz.
This reverts a refactoring from https://github.com/scala/scala/commit/963aabbeb4 MultiString settings would not properly write an unparse string that could be reparsed, leading to failures when forking scalac in ant. Specifically, if a setting was empty, it was getting added to the unparse string and causing scalac to fail. This at least reverts to previous behavior (also more correct for multiple values). Whatever we do here has to work with the @file style argument reading and can't place empty options on the command line. Also, This assumes there are tests around the behvior the REPL needs. Note: The test is not automated yet, so unfortunately, we need to improve ANT testing capabilities to prevent regressons
Diffstat (limited to 'test/ant')
-rw-r--r--test/ant/test-basic/build.xml33
-rw-r--r--test/ant/test-basic/src/test-1.scala0
2 files changed, 33 insertions, 0 deletions
diff --git a/test/ant/test-basic/build.xml b/test/ant/test-basic/build.xml
new file mode 100644
index 0000000000..acc210806f
--- /dev/null
+++ b/test/ant/test-basic/build.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="test-simple" default="compile">
+ <description>Super simple test for Scala</description>
+
+ <target name="init">
+ <!-- Define project CLASSPATH. -->
+ <property name="base.dir" value="../../.."/>
+ <property name="pack.dir" value="${base.dir}/build/pack/"/>
+ <property name="build.dir" value="classes"/>
+ <property name="src.dir" value="src"/>
+ <property name="jvmargs" value=""/>
+ <path id="scala.classpath">
+ <fileset dir="${pack.dir}/lib/"> <include name="*.jar" /> </fileset>
+ </path>
+
+ <!-- Define scala compiler, scaladoc, etc command -->
+ <taskdef resource="scala/tools/ant/antlib.xml">
+ <classpath refid="scala.classpath" />
+ </taskdef>
+ </target>
+
+ <target name="compile" depends="init">
+ <mkdir dir="${build.dir}"/>
+
+ <scalac srcdir="${src.dir}" destdir="${build.dir}"
+ classpathref="scala.classpath" fork="true" target="jvm-1.5"
+ deprecation="no" addparams="-no-specialization"
+ jvmargs="${jvmargs} -XX:+UseConcMarkSweepGC">
+ <include name="**/*.scala"/>
+ </scalac>
+ </target>
+</project>
diff --git a/test/ant/test-basic/src/test-1.scala b/test/ant/test-basic/src/test-1.scala
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/ant/test-basic/src/test-1.scala