Project: JDT
Bug 324285 [JUnit] RemoteTestRunnerClient destroys line delimiters
Reported: 2010-09-02 05:46:41 | Status: verified fixed

3.6 and HEAD. It took me quite a while to figure out why some of my tests failed until I noticed that the only difference were in the line delimiters. Test Case: 1. paste this source: --- %< --- import junit.framework.TestCase; public class C extends TestCase { public void test1() { String s1= "a\nb"; String s2= "a\r\nb"; assertEquals(s2, s1); } } --- %< --- 2. fix build path 3. run it as JUnit Test 4. compare the failing string result ==> no diffs found and different line delimiters are not visible. JUnit delivers the correct results but the reader in RemoteTestRunnerClient hard-codes the line delimiters to '\n'.

Files changed in fix:
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/AbstractTestRunSessionSerializationTests.java