From 81825cc9a8a9683ba30ee2aef79a160f74ad7235 Mon Sep 17 00:00:00 2001 From: Slava Volkov Date: Mon, 24 Jul 2023 14:02:26 +0300 Subject: [PATCH] add test item with hieroglyph --- .../apk/DoNotCompressHieroglyphTest.java | 20 +++++++++++++++++++ .../apk/donotcompress_with_hieroglyph.yml | 6 ++++++ 2 files changed, 26 insertions(+) create mode 100644 brut.apktool/apktool-lib/src/test/java/brut/androlib/apk/DoNotCompressHieroglyphTest.java create mode 100644 brut.apktool/apktool-lib/src/test/resources/apk/donotcompress_with_hieroglyph.yml diff --git a/brut.apktool/apktool-lib/src/test/java/brut/androlib/apk/DoNotCompressHieroglyphTest.java b/brut.apktool/apktool-lib/src/test/java/brut/androlib/apk/DoNotCompressHieroglyphTest.java new file mode 100644 index 0000000000..ff116eafa7 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/java/brut/androlib/apk/DoNotCompressHieroglyphTest.java @@ -0,0 +1,20 @@ +package brut.androlib.apk; + +import brut.androlib.exceptions.AndrolibException; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class DoNotCompressHieroglyphTest { + + @Test + public void testHieroglyph() throws AndrolibException { + ApkInfo apkInfo = ApkInfo.load( + this.getClass().getResourceAsStream("/apk/donotcompress_with_hieroglyph.yml")); + assertEquals("2.0.0", apkInfo.version); + assertEquals("testapp.apk", apkInfo.getApkFileName()); + assertEquals(2, apkInfo.doNotCompress.size()); + assertEquals("assets/AllAssetBundles/Andriod/tx_1001_冰原1", apkInfo.doNotCompress.get(0)); + assertEquals("assets/AllAssetBundles/Andriod/tx_1001_冰原1.manifest", apkInfo.doNotCompress.get(1)); + } +} diff --git a/brut.apktool/apktool-lib/src/test/resources/apk/donotcompress_with_hieroglyph.yml b/brut.apktool/apktool-lib/src/test/resources/apk/donotcompress_with_hieroglyph.yml new file mode 100644 index 0000000000..f3ff13dad6 --- /dev/null +++ b/brut.apktool/apktool-lib/src/test/resources/apk/donotcompress_with_hieroglyph.yml @@ -0,0 +1,6 @@ +version: 2.0.0 +apkFileName: testapp.apk +doNotCompress: +- assets/AllAssetBundles/Andriod/tx_1001_冰原1 +- assets/AllAssetBundles/Andriod/tx_1001_冰原1.manifest +