mirror of
https://github.com/revanced/Apktool.git
synced 2024-11-19 19:09:24 +01:00
Improve the readability of the newline normalization stuff for tests
This commit is contained in:
parent
5388ed57ba
commit
1d597910e2
@ -40,6 +40,7 @@ import org.jf.dexlib2.analysis.ClassPath;
|
||||
import org.jf.dexlib2.iface.ClassDef;
|
||||
import org.jf.dexlib2.iface.DexFile;
|
||||
import org.jf.util.IndentingWriter;
|
||||
import org.jf.util.TextUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@ -105,9 +106,8 @@ public class AnalysisTest {
|
||||
className.substring(1, className.length() - 1));
|
||||
String smaliContents = readResource(smaliPath);
|
||||
|
||||
String newline = System.getProperty("line.separator");
|
||||
Assert.assertEquals(smaliContents.replace("\r", "").replace("\n", newline),
|
||||
stringWriter.toString().replace("\r", "").replace("\n", newline));
|
||||
Assert.assertEquals(TextUtils.normalizeNewlines(smaliContents),
|
||||
TextUtils.normalizeNewlines(stringWriter.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user