ebourg      2004/07/12 07:35:29

  Modified:    configuration/src/test/org/apache/commons/configuration
                        TestConfigurationUtils.java
  Log:
  Now use the "line.separator" system property to make the test plateform independent.
  
  Revision  Changes    Path
  1.5       +4 -3      
jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java
  
  Index: TestConfigurationUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestConfigurationUtils.java       12 Jul 2004 14:12:22 -0000      1.4
  +++ TestConfigurationUtils.java       12 Jul 2004 14:35:29 -0000      1.5
  @@ -17,7 +17,6 @@
    */
   
   import java.io.File;
  -import java.io.PrintStream;
   import java.net.URL;
   
   import junit.framework.TestCase;
  @@ -32,19 +31,21 @@
   
       public void testToString()
       {
  +        String lineSeparator = System.getProperty("line.separator");
  +
           assertEquals("String representation of an empty configuration", "", 
ConfigurationUtils.toString(config));
   
           config.setProperty("one", "1");
           assertEquals("String representation of a configuration", "one=1", 
ConfigurationUtils.toString(config));
   
           config.setProperty("two", "2");
  -        assertEquals("String representation of a configuration", "one=1\ntwo=2" , 
ConfigurationUtils.toString(config));
  +        assertEquals("String representation of a configuration", "one=1" + 
lineSeparator + "two=2" , ConfigurationUtils.toString(config));
           
           config.clearProperty("one");
           assertEquals("String representation of a configuration", "two=2" , 
ConfigurationUtils.toString(config));
                   
           config.setProperty("one","1");
  -        assertEquals("String representation of a configuration", "two=2\none=1" , 
ConfigurationUtils.toString(config));
  +        assertEquals("String representation of a configuration", "two=2" + 
lineSeparator + "one=1" , ConfigurationUtils.toString(config));
       }
   
       public void testGetURL() throws Exception
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to