Browse Source

ensure forward-slashes on Windows; deal with directories containing spaces in exec task's arguments

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1311130 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 13 years ago
parent
commit
a4a5fb9b14
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/tests/antunit/taskdefs/exec/exec-test.xml

+ 7
- 2
src/tests/antunit/taskdefs/exec/exec-test.xml View File

@@ -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"/>


Loading…
Cancel
Save