From 231ce72483df31d706b2770e8ca31e589da414e9 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 13 Sep 2020 13:13:18 -0400 Subject: [PATCH] test: add more tests for #2386 --- .../test/java/brut/androlib/aapt2/BuildAndDecodeTest.java | 4 ++++ .../aapt2/testapp/res/drawable/$avd_show_password__0.xml | 4 ++++ .../aapt2/testapp/res/drawable/$avd_show_password__1.xml | 3 +++ .../aapt2/testapp/res/drawable/$avd_show_password__2.xml | 3 +++ .../aapt2/testapp/res/drawable/avd_show_password.xml | 6 ++++++ 5 files changed, 20 insertions(+) create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__0.xml create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__1.xml create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__2.xml create mode 100644 brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/avd_show_password.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 2daa0fa6..67764033 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 @@ -104,6 +104,10 @@ public class BuildAndDecodeTest extends BaseTest { @Test public void leadingDollarSignResourceNameTest() throws BrutException { compareXmlFiles("res/drawable/$avd_hide_password__0.xml"); + compareXmlFiles("res/drawable/$avd_show_password__0.xml"); + compareXmlFiles("res/drawable/$avd_show_password__1.xml"); + compareXmlFiles("res/drawable/$avd_show_password__2.xml"); + compareXmlFiles("res/drawable/avd_show_password.xml"); } @Test diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__0.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__0.xml new file mode 100644 index 00000000..f2aae511 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__0.xml @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__1.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__1.xml new file mode 100644 index 00000000..e54c5a6c --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__1.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__2.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__2.xml new file mode 100644 index 00000000..390a5f5e --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/$avd_show_password__2.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/avd_show_password.xml b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/avd_show_password.xml new file mode 100644 index 00000000..a0085e10 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/aapt2/testapp/res/drawable/avd_show_password.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file