修复绝对路径模糊匹配的BUG

This commit is contained in:
rain
2024-05-13 19:59:51 +08:00
parent 1dbcc9bba7
commit d3ef608a42
7 changed files with 88 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.slf4j.Logger;
@@ -64,6 +65,7 @@ public class AbsoluteConfigPathELDeclMultiSpringbootTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsPath() throws Exception{
Assertions.assertTrue(() -> {
LiteflowConfig config = LiteflowConfigGetter.get();
@@ -73,6 +75,18 @@ public class AbsoluteConfigPathELDeclMultiSpringbootTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());

View File

@@ -15,6 +15,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.slf4j.Logger;
@@ -66,6 +67,7 @@ public class AbsoluteConfigPathELDeclSpringbootTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsPath() throws Exception{
Assertions.assertTrue(() -> {
LiteflowConfig config = LiteflowConfigGetter.get();
@@ -75,6 +77,18 @@ public class AbsoluteConfigPathELDeclSpringbootTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());

View File

@@ -14,6 +14,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import java.util.Objects;
@@ -51,6 +52,7 @@ public class AbsoluteConfigPathTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsPath() throws Exception{
Assertions.assertTrue(() -> {
LiteflowConfig config = new LiteflowConfig();
@@ -60,6 +62,18 @@ public class AbsoluteConfigPathTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());

View File

@@ -13,6 +13,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
import org.noear.solon.annotation.Inject;
import org.noear.solon.test.SolonJUnit5Extension;
@@ -57,6 +58,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsTest() throws Exception {
Assertions.assertTrue(() -> {
LiteflowConfig config = LiteflowConfigGetter.get();
@@ -66,6 +68,18 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());

View File

@@ -13,6 +13,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -71,6 +72,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsPath4() throws Exception{
Assertions.assertTrue(() -> {
LiteflowConfig config = LiteflowConfigGetter.get();
@@ -80,6 +82,18 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());

View File

@@ -13,6 +13,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@@ -56,6 +57,7 @@ public class AbsoluteConfigPathELSpringTest extends BaseTest {
}
@Test
@DisabledIf("isWindows")
public void testAbsPath() throws Exception{
Assertions.assertTrue(() -> {
LiteflowConfig config = LiteflowConfigGetter.get();
@@ -65,6 +67,18 @@ public class AbsoluteConfigPathELSpringTest extends BaseTest {
});
}
public static boolean isWindows() {
try {
String osName = System.getProperty("os.name");
if (osName.isEmpty()) return false;
else {
return osName.contains("windows");
}
} catch (Exception e) {
return false;
}
}
@BeforeAll
public static void createFiles() {
rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath());