jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1749144 - /jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java
Date Sun, 19 Jun 2016 10:08:20 GMT
Author: sebb
Date: Sun Jun 19 10:08:20 2016
New Revision: 1749144

URL: http://svn.apache.org/viewvc?rev=1749144&view=rev
Log:
Use line.separator rather than assuming "\n" for all OSes
Thanks to 'harry_no_spot' for spotting this

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java?rev=1749144&r1=1749143&r2=1749144&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/report/core/TestCsvSampleWriter.java Sun Jun 19
10:08:20 2016
@@ -28,6 +28,8 @@ import org.junit.Test;
 
 public class TestCsvSampleWriter {
 
+    private static final String LINE_SEP = System.getProperty("line.separator"); // $NON-NLS-1$
+
     @Before
     public void setUp() throws Exception {
         // We have to initialize JMeterUtils
@@ -50,7 +52,7 @@ public class TestCsvSampleWriter {
                         metadata)) {
             csvWriter.writeHeader();
             csvWriter.flush();
-            assertEquals("a,b\n", writer.toString());
+            assertEquals("a,b" + LINE_SEP, writer.toString());
         }
     }
 
@@ -91,7 +93,7 @@ public class TestCsvSampleWriter {
                     .build();
             csvWriter.write(sample);
             csvWriter.flush();
-            assertEquals("a1,b1\n", writer.toString());
+            assertEquals("a1,b1" + LINE_SEP, writer.toString());
         }
     }
 



Mime
View raw message