mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 18:12:54 +01:00
Change zero-byte-file tests so they test the correct behavior.
* The empty test file needs to be STORED in the testapp, so put it on the initial doNotCompress list. * It needs to have a file extension that matches the NO_COMPRESS_PATTERN. * assertNotSame tests for object equality, which doesn't work for String comparisons.
This commit is contained in:
parent
5db19b3329
commit
05f81f9dd0
@ -493,11 +493,11 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void confirmZeroByteFileIsNotStored() throws BrutException {
|
||||
public void confirmZeroByteFileExtensionIsNotStored() throws BrutException {
|
||||
MetaInfo metaInfo = new Androlib().readMetaFile(sTestNewDir);
|
||||
|
||||
for (String item : metaInfo.doNotCompress) {
|
||||
assertNotSame(item, "empty");
|
||||
assertFalse(item.equals("jpg"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void confirmZeroByteFileIsNotStored() throws BrutException {
|
||||
public void confirmZeroByteFileExtensionIsNotStored() throws BrutException {
|
||||
MetaInfo metaInfo = new Androlib().readMetaFile(sTestNewDir);
|
||||
assertNull(metaInfo.doNotCompress);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ versionInfo:
|
||||
versionName: '1.0'
|
||||
compressionType: false
|
||||
doNotCompress:
|
||||
- assets/0byte_file.jpg
|
||||
- arsc
|
||||
- png
|
||||
- mp3
|
||||
|
@ -10,4 +10,6 @@ versionInfo:
|
||||
versionCode: '1'
|
||||
versionName: '1.0'
|
||||
compressionType: false
|
||||
doNotCompress:
|
||||
- assets/0byte_file.jpg
|
||||
sparseResources: false
|
Loading…
Reference in New Issue
Block a user