修正regx为regex

This commit is contained in:
redkale
2024-06-29 16:32:03 +08:00
parent def85ca1ac
commit 8136345484
19 changed files with 196 additions and 176 deletions

View File

@@ -22,19 +22,19 @@ public class ClassFilterTest {
@Test
public void run1() {
String regx = ClassFilter.formatPackageRegx("*.platf.**");
String regx = ClassFilter.formatPackageRegex("*.platf.**");
Assertions.assertEquals("^(\\w+)\\.platf\\.(.*)$", regx);
}
@Test
public void run2() {
String regx = ClassFilter.formatPackageRegx("com.platf.**.api");
String regx = ClassFilter.formatPackageRegex("com.platf.**.api");
Assertions.assertEquals("^com\\.platf\\.(.*)\\.api$", regx);
}
@Test
public void run3() {
String regx = ClassFilter.formatPackageRegx("**.platf.api");
String regx = ClassFilter.formatPackageRegex("**.platf.api");
Assertions.assertEquals("^(.*)\\.platf\\.api$", regx);
}
}