You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sg...@apache.org on 2008/07/18 23:20:28 UTC
svn commit: r678041 - in /commons/proper/exec/trunk/src: changes/changes.xml
test/java/org/apache/commons/exec/DefaultExecutorTest.java
Author: sgoeschl
Date: Fri Jul 18 14:20:27 2008
New Revision: 678041
URL: http://svn.apache.org/viewvc?rev=678041&view=rev
Log:
[EXEC-26] Not applying the whole patch but just adding one more test
Modified:
commons/proper/exec/trunk/src/changes/changes.xml
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
Modified: commons/proper/exec/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/changes/changes.xml?rev=678041&r1=678040&r2=678041&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/changes/changes.xml (original)
+++ commons/proper/exec/trunk/src/changes/changes.xml Fri Jul 18 14:20:27 2008
@@ -24,13 +24,16 @@
</properties>
<body>
<release version="1.0-SNAPSHOT" date="as in SVN" description="Sandbox release">
+ <action dev="sgoeschl" type="add" due-to="Benjamin Bentmann">
+ Added one additional test : DefaultExecutorTest.testExecuteWithFancyArg
+ </action>
<action dev="sgoeschl" issue="EXEC-25" type="fix">
Using variable substitution within CommandLine broke the regression tests
under Windows. Found also another bug when calling CommandLine.getExecutable()
the result was not substituted at all. As a general rule we do variable
substitution and file separator fixing on the command line executable and
variable substitution but NO file separator fixing for the command line
- arguments.
+ arguments.
</action>
<action dev="sgoeschl" type="add">
Added convinience method to add two parameters to the CommandLine
Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java?rev=678041&r1=678040&r2=678041&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java Fri Jul 18 14:20:27 2008
@@ -331,4 +331,17 @@
assertEquals("Processor Destroyer size should be 0",0,processDestroyer.size());
assertFalse("Process destroyer should not exist as shutdown hook",processDestroyer.isAddedAsShutdownHook());
}
+
+ /**
+ * Invoke the test using some fancy arguments.
+ *
+ * @throws Exception the test failed
+ */
+ public void testExecuteWithFancyArg() throws Exception {
+ CommandLine cl = new CommandLine(testScript);
+ cl.addArgument("test $;`(0)[1]{2}");
+ int exitValue = exec.execute(cl);
+ assertTrue(baos.toString().trim().indexOf("test $;`(0)[1]{2}") > 0);
+ assertFalse(exec.isFailure(exitValue));
+ }
}