mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
xml tests moved to xml-tests module
This commit is contained in:
@@ -18,7 +18,6 @@ package com.intellij.util;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public class EnvironmentUtil {
|
||||
@@ -27,7 +26,8 @@ public class EnvironmentUtil {
|
||||
private EnvironmentUtil() {
|
||||
}
|
||||
|
||||
public static @NonNls Map<String, String> getEnviromentProperties() {
|
||||
@NonNls
|
||||
public static Map<String, String> getEnviromentProperties() {
|
||||
return ourEnviromentProperties;
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ public class EnvironmentUtil {
|
||||
Map enviroment = getEnviromentProperties();
|
||||
String[] envp = new String[enviroment.size()];
|
||||
int i = 0;
|
||||
for (Iterator iterator = enviroment.keySet().iterator(); iterator.hasNext();) {
|
||||
String name = (String)iterator.next();
|
||||
for (Object o : enviroment.keySet()) {
|
||||
String name = (String)o;
|
||||
String value = (String)enviroment.get(name);
|
||||
envp[i++] = name + "=" + value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: mike
|
||||
* Date: Sep 19, 2002
|
||||
* Time: 3:27:12 PM
|
||||
* To change template for new class use
|
||||
* Code Style | Class Templates options (Tools | IDE Options).
|
||||
*/
|
||||
package com.intellij.util;
|
||||
|
||||
import com.intellij.util.EnvironmentUtil;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class EnvironmentUtilTest extends TestCase {
|
||||
public void test1() {
|
||||
Map enviromentProperties = EnvironmentUtil.getEnviromentProperties();
|
||||
assertNotNull(enviromentProperties);
|
||||
if(SystemInfo.isWindows)
|
||||
assertNotNull(enviromentProperties.get("Path"));
|
||||
else
|
||||
assertNotNull(enviromentProperties.get("PATH"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user