From 0a3adab84cb73c54ed526779ca06a0c0f3b782e8 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 23 Nov 2017 06:48:56 -0500 Subject: [PATCH] Add test changes to detect encoding of raw font files - refs #1662 --- .../src/test/java/brut/androlib/BuildAndDecodeTest.java | 5 +++++ 1 file changed, 5 insertions(+) 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 3853bc75..53847fc8 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 @@ -308,7 +308,12 @@ public class BuildAndDecodeTest { File fontXml = new File((sTestNewDir + "/res/font"), "lobster.xml"); File fontFile = new File((sTestNewDir + "/res/font"), "lobster_regular.otf"); + // Per #1662, ensure font file is not encoded. assertTrue(fontXml.isFile()); + compareXmlFiles("/res/font/lobster.xml"); + + // If we properly skipped decoding the font (otf) file, this file should not exist + assertFalse((new File((sTestNewDir + "/res/values"), "fonts.xml")).isFile()); assertTrue(fontFile.isFile()); }