diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java index 5c5395eb..6a4dace5 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java @@ -373,6 +373,16 @@ public class BuildAndDecodeTest { compareUnknownFiles(); } + @Test + public void fileAssetTest() throws BrutException, IOException { + compareAssetsFolder("txt"); + } + + @Test + public void unicodeAssetTest() throws BrutException, IOException { + // failure using ∂ (unicode) + } + @Test public void multipleDexTest() throws BrutException, IOException { compareBinaryFolder("/smali_classes2", false); @@ -434,6 +444,10 @@ public class BuildAndDecodeTest { compareBinaryFolder(File.separatorChar + path, false); } + private void compareAssetsFolder(String path) throws BrutException, IOException { + compareBinaryFolder(File.separatorChar + "assets" + File.separatorChar + path, false); + } + private void compareValuesFiles(String path) throws BrutException { compareXmlFiles("res/" + path, new ElementNameAndAttributeQualifier("name")); } diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/assets/txt/no-unicode.txt b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/assets/txt/no-unicode.txt new file mode 100644 index 00000000..3306f918 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/assets/txt/no-unicode.txt @@ -0,0 +1 @@ +This is an empty file. \ No newline at end of file