[jboss-svn-commits] JBL Code SVN: r6709 - labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 9 13:08:41 EDT 2006


Author: kurt.stam at jboss.com
Date: 2006-10-09 13:08:39 -0400 (Mon, 09 Oct 2006)
New Revision: 6709

Modified:
   labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java
Log:
Fixing unit test so it can run under cygwin. (Escaping backslashes)

Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java	2006-10-09 14:49:13 UTC (rev 6708)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/util/UtilUnitTest.java	2006-10-09 17:08:39 UTC (rev 6709)
@@ -35,13 +35,17 @@
  */
 public class UtilUnitTest extends TestCase {
 
-	public void testDumpSysProps() throws IOException {
+	public void testDumpSysProps() throws IOException 
+	{
 		ByteArrayOutputStream buf = new ByteArrayOutputStream();
 		
 		Util.dumpSysProps(new PrintStream(buf));
 		
 		Properties props = new Properties();
-		props.load(new ByteArrayInputStream(buf.toByteArray()));
+		String env = buf.toString();
+		//escape backslashes to fix running under cygwin
+		env = env.replaceAll("\\\\", "\\\\\\\\");
+		props.load(new ByteArrayInputStream(env.getBytes()));
 		
 		// Just make sure that something was dumped to the printstream
 		// by checking for a property we know will be in the System...




More information about the jboss-svn-commits mailing list