mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57:46 +01:00
test: add aapt1/aapt2 tests for "0byte" files
This commit is contained in:
parent
4bda4674f9
commit
abdd536a18
@ -20,6 +20,7 @@ import brut.androlib.Androlib;
|
||||
import brut.androlib.ApkDecoder;
|
||||
import brut.androlib.BaseTest;
|
||||
import brut.androlib.TestUtils;
|
||||
import brut.androlib.meta.MetaInfo;
|
||||
import brut.directory.ExtFile;
|
||||
import brut.common.BrutException;
|
||||
import brut.util.OS;
|
||||
@ -481,6 +482,15 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void confirmZeroByteFileIsNotStored() throws BrutException {
|
||||
MetaInfo metaInfo = new Androlib().readMetaFile(sTestNewDir);
|
||||
|
||||
for (String item : metaInfo.doNotCompress) {
|
||||
assertNotSame(item, "empty");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableXxhdpiTest() throws BrutException, IOException {
|
||||
compareResFolder("drawable-xxhdpi");
|
||||
|
@ -17,6 +17,7 @@
|
||||
package brut.androlib.aapt2;
|
||||
|
||||
import brut.androlib.*;
|
||||
import brut.androlib.meta.MetaInfo;
|
||||
import brut.common.BrutException;
|
||||
import brut.directory.ExtFile;
|
||||
import brut.util.OS;
|
||||
@ -72,6 +73,12 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
compareValuesFiles("values/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void confirmZeroByteFileIsNotStored() throws BrutException {
|
||||
MetaInfo metaInfo = new Androlib().readMetaFile(sTestNewDir);
|
||||
assertNull(metaInfo.doNotCompress);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void navigationResourceTest() throws BrutException {
|
||||
compareXmlFiles("res/navigation/nav_graph.xml");
|
||||
|
Loading…
Reference in New Issue
Block a user