From edaa2e8163e79678414d24ccfa982a3c95d61e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Mon, 2 May 2011 03:41:08 +0200 Subject: [PATCH] Added cross-type resources tests. E.g. TEST or #ffcc00 - they must be decoded as . --- .../src/test/java/brut/androlib/BuildAndDecodeTest.java | 7 +++++++ .../brut/apktool/testapp/res/values-mcc003/bools.xml | 4 ++++ .../brut/apktool/testapp/res/values-mcc003/integers.xml | 4 ++++ .../brut/apktool/testapp/res/values-mcc003/strings.xml | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/bools.xml create mode 100644 apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/integers.xml create mode 100644 apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/strings.xml diff --git a/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java b/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java index 995d7622..d8b81cdf 100644 --- a/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java +++ b/apktool-lib/src/test/java/brut/androlib/BuildAndDecodeTest.java @@ -67,6 +67,13 @@ public class BuildAndDecodeTest { compareValuesFiles("values-mcc002/strings.xml"); } + @Test + public void crossTypeTest() throws BrutException { + compareValuesFiles("values-mcc003/strings.xml"); + compareValuesFiles("values-mcc003/integers.xml"); + compareValuesFiles("values-mcc003/bools.xml"); + } + @Test public void layout1Test() throws BrutException { compareXmlFiles("res/layout/layout1.xml"); diff --git a/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/bools.xml b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/bools.xml new file mode 100644 index 00000000..d3788db9 --- /dev/null +++ b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/bools.xml @@ -0,0 +1,4 @@ + + + TEST + diff --git a/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/integers.xml b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/integers.xml new file mode 100644 index 00000000..7cd49838 --- /dev/null +++ b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/integers.xml @@ -0,0 +1,4 @@ + + + TEST + diff --git a/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/strings.xml b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/strings.xml new file mode 100644 index 00000000..f72478b8 --- /dev/null +++ b/apktool-lib/src/test/resources/brut/apktool/testapp/res/values-mcc003/strings.xml @@ -0,0 +1,5 @@ + + + true + 5 +