Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324285

Summary: [JUnit] RemoteTestRunnerClient destroys line delimiters
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Dani Megert CLA 2010-09-02 05:46:41 EDT
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'.
Comment 1 Markus Keller CLA 2010-09-08 07:14:32 EDT
Created attachment 178386 [details]
Fix
Comment 2 Markus Keller CLA 2010-09-08 07:15:15 EDT
Fixed in HEAD.
Comment 3 Dani Megert CLA 2010-09-14 06:28:13 EDT
Verified in I20100914-0100.