PRIDE-Utilities / jmzTab

Java implementation of the PSI-PI mzTab specification
http://pride-utilities.github.io/jmzTab
Apache License 2.0
1 stars 4 forks source link

NEW_LINE bug in MZTabConstants #10

Closed UKQIDA closed 4 years ago

UKQIDA commented 7 years ago

The "NEW_LINE" is defined in MZTabConstants.java as System.getProperty("line.separator"). When running MTDlineParserTest.java file on Windows system, if fails at line 211: assertEquals(msRun1.toString(), "MTD\tms_run[1]-location\tnull\n"). The reason is that System.getProperty("line.separator") on Windows is "\r\n". So the return value from msRun1.toString() is "MTD\tms_run[1]-location\tnull\r\n".

Change line 211 to assertEquals(msRun1.toString(), "MTD\tms_run[1]-location\tnull"+MZTabConstants.NEW_LINE); will fix the test file.

nilshoffmann commented 4 years ago

Fixed in #12