ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1311130 - /ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
Date Mon, 09 Apr 2012 05:00:48 GMT
Author: bodewig
Date: Mon Apr  9 05:00:47 2012
New Revision: 1311130

URL: http://svn.apache.org/viewvc?rev=1311130&view=rev
Log:
ensure forward-slashes on Windows; deal with directories containing spaces in exec task's
arguments

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml?rev=1311130&r1=1311129&r2=1311130&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml Mon Apr  9 05:00:47 2012
@@ -639,13 +639,16 @@
       <pathconvert dirsep="/" property="out">
         <path location="${output}"/>
       </pathconvert>
+      <pathconvert dirsep="/" property="javaP">
+        <path location="${java}"/>
+      </pathconvert>
       <echo file="${input}/org/example/CallHello.java"><![CDATA[
 package org.example;
 public class CallHello {
     public static void main(String[] args)
         throws Exception {
         String[] cmd = new String[] {
-            "${java}", "-cp", "${out}", "org.example.Hello"
+            "${javaP}", "-cp", "${out}", "org.example.Hello"
         };
         Runtime.getRuntime().exec(cmd);
         Thread.sleep(1 * 1000);
@@ -667,7 +670,9 @@ public class Hello {
       <mkdir dir="${output}"/>
       <javac srcdir="${input}" destdir="${output}"/>
       <exec executable="${java}" failonerror="true">
-        <arg line="-cp ${output} org.example.CallHello"/>
+        <arg value="-cp"/>
+        <arg value="${output}"/>
+        <arg value="org.example.CallHello"/>
       </exec>
       <au:assertLogContains text="finished"/>
       <au:assertLogDoesntContain text="Hello 20"/>



Mime
View raw message