mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 22:54:24 +02: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.ClassDef;
|
||||||
import org.jf.dexlib2.iface.DexFile;
|
import org.jf.dexlib2.iface.DexFile;
|
||||||
import org.jf.util.IndentingWriter;
|
import org.jf.util.IndentingWriter;
|
||||||
|
import org.jf.util.TextUtils;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -105,9 +106,8 @@ public class AnalysisTest {
|
|||||||
className.substring(1, className.length() - 1));
|
className.substring(1, className.length() - 1));
|
||||||
String smaliContents = readResource(smaliPath);
|
String smaliContents = readResource(smaliPath);
|
||||||
|
|
||||||
String newline = System.getProperty("line.separator");
|
Assert.assertEquals(TextUtils.normalizeNewlines(smaliContents),
|
||||||
Assert.assertEquals(smaliContents.replace("\r", "").replace("\n", newline),
|
TextUtils.normalizeNewlines(stringWriter.toString()));
|
||||||
stringWriter.toString().replace("\r", "").replace("\n", newline));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user