add slash for path

This commit is contained in:
Looly
2021-04-23 10:59:44 +08:00
parent 588933a733
commit 63b93e02f9
7 changed files with 166 additions and 104 deletions

View File

@@ -4,26 +4,28 @@ import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
public class SystemUtilTest {
@Test
@Ignore
public void dumpTest() {
SystemUtil.dumpSystemInfo();
}
@Test
public void getCurrentPidTest() {
long pid = SystemUtil.getCurrentPID();
Assert.assertTrue(pid > 0);
}
@Test
public void getJavaInfoTest() {
JavaInfo javaInfo = SystemUtil.getJavaInfo();
Assert.assertNotNull(javaInfo);
}
@Test
public void getOsInfoTest() {
OsInfo osInfo = SystemUtil.getOsInfo();
@@ -35,5 +37,11 @@ public class SystemUtilTest {
HostInfo hostInfo = SystemUtil.getHostInfo();
Assert.assertNotNull(hostInfo);
}
@Test
public void getUserInfoTest(){
// https://gitee.com/dromara/hutool/issues/I3NM39
final UserInfo userInfo = SystemUtil.getUserInfo();
Assert.assertTrue(userInfo.getTempDir().endsWith(File.separator));
}
}