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

Bug 490118

Summary: DOT: use platform specific line separators
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: 4.0.0 (Neon) M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Implementation improvement to use platform-specific line separators nyssen: iplog+

Description Tamas Miklossy CLA 2016-03-21 16:25:41 EDT
Hello Alexander,

Currently the following test cases defined in the DotExportTests.java are failing on Windows platform:
- simpleGraph
- directedGraph
- styledGraph
- labeledGraph
    
Within the test cases assertions, the expected strings are concatenated with the platform specific
line separators, while the actual strings are concatenated with the hard-coded linux-style line separators. 
It seems that your new Xtend-based DotExport implementation (Bug 489774) uses platform specific line separators which is not compatible how the test cases are currently implemented.
Comment 1 Tamas Miklossy CLA 2016-03-21 16:27:42 EDT
Created attachment 260459 [details]
Implementation improvement to use platform-specific line separators

I uploaded a patch with the following changes (now the test cases succeed again on Windows platform): 
- Use the platform specific line separators instead of the hard-coded linux-style line separator.
- Use the public static String DotFileUtils.read(final File file) method everywhere consistently to read .dot files.

Hereby I confirm that my contribution complies with https://www.eclipse.org/legal/CoO.php.
Comment 2 Alexander Nyßen CLA 2016-03-22 16:05:14 EDT
Thanks Tamas. I applied your patch, adjusting only the copyright notices. Resolving as fixed in 4.0.0 M7.