commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1004505 - /commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
Date Tue, 05 Oct 2010 01:44:16 GMT
Author: sebb
Date: Tue Oct  5 01:44:15 2010
New Revision: 1004505

URL: http://svn.apache.org/viewvc?rev=1004505&view=rev
Log:
Fix VMS test
"Hello Foo!" can begin at start of buffer

Modified:
    commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java

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=1004505&r1=1004504&r2=1004505&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
Tue Oct  5 01:44:15 2010
@@ -573,7 +573,7 @@ public class DefaultExecutorTest extends
      */
     public void testStdInHandling() throws Exception {
 
-        ByteArrayInputStream bais = new ByteArrayInputStream("Foo\n".getBytes());
+        ByteArrayInputStream bais = new ByteArrayInputStream("Foo".getBytes()); // newline
not needed; causes problems for VMS
         CommandLine cl = new CommandLine(this.stdinSript);
         PumpStreamHandler pumpStreamHandler = new PumpStreamHandler( this.baos, System.err,
bais);
         DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
@@ -586,7 +586,7 @@ public class DefaultExecutorTest extends
 
         assertFalse(exec.isFailure(resultHandler.getExitValue()));
         String result = baos.toString();
-        assertTrue("Result +'"+result+"' should contain 'Hello Foo!'", result.indexOf("Hello
Foo!") > 0);
+        assertTrue("Result '"+result+"' should contain 'Hello Foo!'", result.indexOf("Hello
Foo!") >= 0);
     }
 
     /**



Mime
View raw message