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 569c73f9..b5b39ad8 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 @@ -67,12 +67,22 @@ public class BuildAndDecodeTest { apkDecoder.decode(); } + @Test + public void valuesAnimsTest() throws BrutException { + compareValuesFiles("values-mcc001/anims.xml"); + } + @Test public void valuesArraysTest() throws BrutException { compareValuesFiles("values-mcc001/arrays.xml"); compareValuesFiles("values-mcc002/arrays.xml"); } + @Test + public void valuesAttrsTest() throws BrutException { + compareValuesFiles("values/attrs.xml"); + } + @Test public void valuesBoolsTest() throws BrutException { compareValuesFiles("values-mcc001/bools.xml"); @@ -88,6 +98,11 @@ public class BuildAndDecodeTest { compareValuesFiles("values-mcc001/dimens.xml"); } + @Test + public void valuesDrawablesTest() throws BrutException { + compareValuesFiles("values-mcc001/drawables.xml"); + } + @Test public void valuesIdsTest() throws BrutException { compareValuesFiles("values-mcc001/ids.xml"); @@ -98,6 +113,11 @@ public class BuildAndDecodeTest { compareValuesFiles("values-mcc001/integers.xml"); } + @Test + public void valuesLayoutsTest() throws BrutException { + compareValuesFiles("values-mcc001/layouts.xml"); + } + @Test public void xmlPluralsTest() throws BrutException { compareValuesFiles("values-mcc001/plurals.xml"); @@ -108,6 +128,11 @@ public class BuildAndDecodeTest { compareValuesFiles("values-mcc001/strings.xml"); } + @Test + public void valuesStylesTest() throws BrutException { + compareValuesFiles("values-mcc001/styles.xml"); + } + @Test public void valuesReferencesTest() throws BrutException { compareValuesFiles("values-mcc002/strings.xml"); @@ -139,37 +164,42 @@ public class BuildAndDecodeTest { @Test public void drawableNoDpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-nodpi"); + compareResFolder("drawable-nodpi"); } @Test public void drawableNumberedDpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-534dpi"); + compareResFolder("drawable-534dpi"); } @Test public void drawableLdpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-ldpi"); + compareResFolder("drawable-ldpi"); } @Test public void drawableMdpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-mdpi"); + compareResFolder("drawable-mdpi"); } @Test public void drawableTvdpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-tvdpi"); + compareResFolder("drawable-tvdpi"); } @Test public void drawableXhdpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-xhdpi"); + compareResFolder("drawable-xhdpi"); } @Test public void drawableXxhdpiTest() throws BrutException, IOException { - compareDrawablesFolder("drawable-xxhdpi"); + compareResFolder("drawable-xxhdpi"); + } + + @Test + public void resRawTest() throws BrutException, IOException { + compareResFolder("raw"); } @Test @@ -223,7 +253,7 @@ public class BuildAndDecodeTest { }); } - private boolean compareDrawablesFolder(String path) throws BrutException, IOException { + private boolean compareResFolder(String path) throws BrutException, IOException { sResult = true; compareBinaryFolder(path, true); return sResult; diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/raw/blank_test.png b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/raw/blank_test.png new file mode 100644 index 00000000..a1d202bc Binary files /dev/null and b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/raw/blank_test.png differ diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/anims.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/anims.xml new file mode 100644 index 00000000..e2a285e2 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/anims.xml @@ -0,0 +1,12 @@ + + + @*android:anim/grow_fade_in_from_bottom + @*android:anim/push_down_in + @*android:anim/push_down_out + @*android:anim/push_up_in + @*android:anim/push_up_out + @*android:anim/shrink_fade_out_from_bottom + @*android:anim/slide_out_down + @*android:anim/wallpaper_open_exit + @*android:anim/wallpaper_open_exit + diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/drawables.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/drawables.xml new file mode 100644 index 00000000..4301edae --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/drawables.xml @@ -0,0 +1,8 @@ + + + @*android:drawable/ab_bottom_solid_light_holo + @*android:drawable/btn_check_off_holo_light + @*android:drawable/btn_check_on_holo_light + @*android:drawable/btn_keyboard_key_fulltrans + #00000000 + diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/layouts.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/layouts.xml new file mode 100644 index 00000000..98e1b101 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/layouts.xml @@ -0,0 +1,7 @@ + + + @*android:layout/preference_header_item + @*android:layout/preference_list_fragment + @*android:layout/preference_widget_checkbox + @*android:layout/preference_widget_switch + diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/styles.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/styles.xml new file mode 100644 index 00000000..0dbb88f6 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc001/styles.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/attrs.xml b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/attrs.xml new file mode 100644 index 00000000..d77a8838 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/brut/apktool/testapp/res/values/attrs.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file