Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324285 - [JUnit] RemoteTestRunnerClient destroys line delimiters
Summary: [JUnit] RemoteTestRunnerClient destroys line delimiters
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 05:46 EDT by Dani Megert CLA
Modified: 2010-09-14 06:28 EDT (History)
0 users

See Also:


Attachments
Fix (23.03 KB, patch)
2010-09-08 07:14 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.