From 33f6d465d851ea9a6b53bc7a96de2c26aed8aa14 Mon Sep 17 00:00:00 2001 From: MrIkso Date: Wed, 13 Oct 2021 23:13:07 +0300 Subject: [PATCH] test: add test to check build/decode private references --- .../java/brut/androlib/aapt2/BuildAndDecodeTest.java | 10 ++++++++++ .../test/resources/aapt2/testapp/res/values/bools.xml | 4 ++++ .../test/resources/aapt2/testapp/res/values/colors.xml | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/bools.xml create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/colors.xml diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java index f94462dfe3..214c6f97f2 100644 --- a/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/aapt2/BuildAndDecodeTest.java @@ -72,6 +72,16 @@ public void valuesStringsTest() throws BrutException { compareValuesFiles("values/strings.xml"); } + @Test + public void valuesColorsTest() throws BrutException { + compareValuesFiles("values/colors.xml"); + } + + @Test + public void valuesBoolsTest() throws BrutException { + compareValuesFiles("values/bools.xml"); + } + @Test public void valuesMaxLengthTest() throws BrutException { compareValuesFiles("values-es/strings.xml"); diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/bools.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/bools.xml new file mode 100644 index 0000000000..b36f3954aa --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/bools.xml @@ -0,0 +1,4 @@ + + + @*android:bool/config_enableActivityRecognitionHardwareOverlay + diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/colors.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/colors.xml new file mode 100644 index 0000000000..eb11a5b2b3 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/values/colors.xml @@ -0,0 +1,4 @@ + + + @*android:color/Indigo_700 +