mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 09:17:35 +01:00
added failing unit-test for bug 603
This commit is contained in:
parent
f85dc478b2
commit
f130c995fb
@ -20,7 +20,7 @@ import brut.common.BrutException;
|
||||
import brut.directory.FileDirectory;
|
||||
import brut.util.OS;
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@ -214,6 +214,22 @@ public class BuildAndDecodeTest {
|
||||
compareLibsFolder("libs");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unknownFolderTest() throws BrutException, IOException {
|
||||
compareUnknownFiles();
|
||||
}
|
||||
|
||||
private void compareUnknownFiles() throws BrutException, IOException {
|
||||
Map<String, Object> control = new Androlib().readMetaFile(sTestOrigDir);
|
||||
Map<String, Object> test = new Androlib().readMetaFile(sTestNewDir);
|
||||
assertTrue(control.containsKey("unknownFiles"));
|
||||
assertTrue(test.containsKey("unknownFiles"));
|
||||
|
||||
Map<String, String> control_files = (Map<String, String>)control.get("unknownFiles");
|
||||
Map<String, String> test_files = (Map<String, String>)test.get("unknownFiles");
|
||||
assertTrue(control_files.size() == test_files.size());
|
||||
}
|
||||
|
||||
private boolean compareBinaryFolder(String path, boolean res) throws BrutException, IOException {
|
||||
|
||||
String tmp = "";
|
||||
|
@ -4,10 +4,13 @@ isFrameworkApk: false
|
||||
usesFramework:
|
||||
ids:
|
||||
- 1
|
||||
packageInfo:
|
||||
forced-package-id: '127'
|
||||
versionInfo:
|
||||
versionCode: '1'
|
||||
versionName: '1.0'
|
||||
compressionType: false
|
||||
unknownFiles:
|
||||
hidden.file: '8'
|
||||
unk_folder/unknown_file: '8'
|
||||
unk_folder/unknown_file: '8'
|
||||
lib_bug603/bug603: '8'
|
@ -0,0 +1 @@
|
||||
https://code.google.com/p/android-apktool/issues/detail?id=603
|
Loading…
x
Reference in New Issue
Block a user