This commit is contained in:
Skylot 2024-06-02 18:21:21 +01:00
parent 02bc27e887
commit 5640f3b931
No known key found for this signature in database
GPG Key ID: 47A4975761262B6A

View File

@ -1,9 +1,14 @@
package jadx.tests.integration.deobf.a;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import jadx.api.deobf.IDeobfCondition;
import jadx.api.deobf.impl.CombineDeobfConditions;
import jadx.core.deobf.conditions.AvoidClsAndPkgNamesCollision;
import jadx.core.deobf.conditions.JadxRenameConditions;
import jadx.tests.api.IntegrationTest;
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat;
@ -34,6 +39,11 @@ public class TestNegativeRenameCondition extends IntegrationTest {
// disable all renaming options
args.setRenameFlags(Collections.emptySet());
// disable rename by collision between class and package names
List<IDeobfCondition> list = JadxRenameConditions.buildDefaultDeobfConditions();
list.removeIf(c -> c.getClass().equals(AvoidClsAndPkgNamesCollision.class));
args.setRenameCondition(CombineDeobfConditions.combine(list));
assertThat(getClassNode(TestCls.class))
.code()
.doesNotContain("renamed from")