mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-22 09:47:34 +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.ApkDecoder;
|
||||||
import brut.androlib.BaseTest;
|
import brut.androlib.BaseTest;
|
||||||
import brut.androlib.TestUtils;
|
import brut.androlib.TestUtils;
|
||||||
|
import brut.androlib.meta.MetaInfo;
|
||||||
import brut.directory.ExtFile;
|
import brut.directory.ExtFile;
|
||||||
import brut.common.BrutException;
|
import brut.common.BrutException;
|
||||||
import brut.util.OS;
|
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
|
@Test
|
||||||
public void drawableXxhdpiTest() throws BrutException, IOException {
|
public void drawableXxhdpiTest() throws BrutException, IOException {
|
||||||
compareResFolder("drawable-xxhdpi");
|
compareResFolder("drawable-xxhdpi");
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package brut.androlib.aapt2;
|
package brut.androlib.aapt2;
|
||||||
|
|
||||||
import brut.androlib.*;
|
import brut.androlib.*;
|
||||||
|
import brut.androlib.meta.MetaInfo;
|
||||||
import brut.common.BrutException;
|
import brut.common.BrutException;
|
||||||
import brut.directory.ExtFile;
|
import brut.directory.ExtFile;
|
||||||
import brut.util.OS;
|
import brut.util.OS;
|
||||||
@ -72,6 +73,12 @@ public class BuildAndDecodeTest extends BaseTest {
|
|||||||
compareValuesFiles("values/strings.xml");
|
compareValuesFiles("values/strings.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void confirmZeroByteFileIsNotStored() throws BrutException {
|
||||||
|
MetaInfo metaInfo = new Androlib().readMetaFile(sTestNewDir);
|
||||||
|
assertNull(metaInfo.doNotCompress);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void navigationResourceTest() throws BrutException {
|
public void navigationResourceTest() throws BrutException {
|
||||||
compareXmlFiles("res/navigation/nav_graph.xml");
|
compareXmlFiles("res/navigation/nav_graph.xml");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user