xml tests moved to xml-tests module

This commit is contained in:
Alexey Kudravtsev
2011-02-04 13:43:38 +03:00
parent 4dcebe9883
commit 489c8b296a
2 changed files with 30 additions and 4 deletions
@@ -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"));
}
}