Merge of cross-platform fix for smali's AnalysisTest.java

Merge https://github.com/JesusFreke/smali/pull/20 into fork: Use System.lineSeparator() for cross-platform compatible line endings for runTest() method in AnalysisTest.java. The patch fixes build failures of type `org.jf.baksmali.AnalysisTest > DuplicateTest FAILED [junit.framework.ComparisonFailure at AnalysisTest.java:107]` on Windows systems.
This commit is contained in:
Stephan Schmitz 2013-11-18 13:31:07 +01:00
parent d2fc74d984
commit 073019fa54

View File

@ -104,7 +104,8 @@ public class AnalysisTest {
className.substring(1, className.length() - 1));
String smaliContents = readResource(smaliPath);
Assert.assertEquals(smaliContents.replace("\r\n", "\n"), stringWriter.toString().replace("\r\n", "\n"));
Assert.assertEquals(smaliContents.replace("\r", "").replace("\n", System.lineSeparator()),
stringWriter.toString().replace("\r", "").replace("\n", System.lineSeparator()));
}
}