From a17be60676ae8329672868872e33b65fa79cbe03 Mon Sep 17 00:00:00 2001 From: Stefan Zeiger Date: Tue, 22 Nov 2011 18:44:00 +0000 Subject: Make partest work with spaces in the path (from... Make partest work with spaces in the path (from batch script and ant task). - The 'partest' ant task gets a new 'compilerargs' element for scalac - options (like in scalacfork and javac). Fixed argument list handling - in partest task. Further improvements to argument list handling for - all ant tasks. Fixed argument list handling in DirectTest (used by - partest shell scripts) Fixed path handling in several test cases. Closes SI-622. Review by phaller. --- test/files/jvm/inner.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/files/jvm') diff --git a/test/files/jvm/inner.scala b/test/files/jvm/inner.scala index 156d9e69a8..009d52e5bc 100644 --- a/test/files/jvm/inner.scala +++ b/test/files/jvm/inner.scala @@ -71,15 +71,15 @@ object Scalatest { val tmpfile = new FileWriter(tmpfilename) tmpfile.write(src) tmpfile.close - exec(javac + " -d " + outputdir + " -classpath " + classpath + " " + tmpfilename) + exec(javac, "-d", outputdir, "-classpath", classpath, tmpfilename) } def java(cname: String) = - exec(javacmd + " -cp " + classpath + " " + cname) + exec(javacmd, "-cp", classpath, cname) /** Execute cmd, wait for the process to end and pipe it's output to stdout */ - private def exec(cmd: String) { - val proc = Runtime.getRuntime().exec(cmd) + private def exec(args: String*) { + val proc = Runtime.getRuntime().exec(args.toArray) val inp = new BufferedReader(new InputStreamReader(proc.getInputStream)) val errp = new BufferedReader(new InputStreamReader(proc.getErrorStream)) proc.waitFor() -- cgit v1.2.3