camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1049793 - in /camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec: ExecJavaProcessTest.java ExecutableJavaProgram.java
Date Thu, 16 Dec 2010 07:01:35 GMT
Author: davsclaus
Date: Thu Dec 16 07:01:35 2010
New Revision: 1049793

URL: http://svn.apache.org/viewvc?rev=1049793&view=rev
Log:
Fixed test on windows

Modified:
    camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
    camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecutableJavaProgram.java

Modified: camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java?rev=1049793&r1=1049792&r2=1049793&view=diff
==============================================================================
--- camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
(original)
+++ camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
Thu Dec 16 07:01:35 2010
@@ -279,7 +279,7 @@ public class ExecJavaProcessTest extends
         assertNotNull(result);
 
         String out = IOConverter.toString(result.getStdout(), exchange);
-        assertEquals(PRINT_ARGS_STDOUT + "\nHello World\n", out);
+        assertTrue(out, out.contains("1Hello World"));
     }
 
     /**
@@ -310,7 +310,8 @@ public class ExecJavaProcessTest extends
         assertNotNull(result);
 
         String out = IOConverter.toString(result.getStdout(), exchange);
-        assertEquals(PRINT_ARGS_STDOUT + "\nHello\nWorld\n", out);
+        assertTrue(out, out.contains("1Hello"));
+        assertTrue(out, out.contains("2World"));
     }
 
     /**

Modified: camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecutableJavaProgram.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecutableJavaProgram.java?rev=1049793&r1=1049792&r2=1049793&view=diff
==============================================================================
--- camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecutableJavaProgram.java
(original)
+++ camel/trunk/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecutableJavaProgram.java
Thu Dec 16 07:01:35 2010
@@ -62,8 +62,9 @@ public class ExecutableJavaProgram {
             System.out.print(PRINT_IN_STDOUT);
             System.exit(0);
         } else if (args[0].equals(PRINT_ARGS_STDOUT)) {
-            for (String arg : args) {
-                System.out.println(arg);
+            for (int i = 0; i < args.length; i++) {
+                String arg = args[i];
+                System.out.println(i + arg);
             }
             System.exit(0);
         } else if (args[0].equals(PRINT_IN_STDERR)) {



Mime
View raw message