* gcc.dg/tree-ssa/alias-30.c (dg-options): Dump only fre1 details.
[official-gcc.git] / libjava / testsuite / libjava.lang / Process_7.java
blobd6f654eb2e0d4d645aa4e766495f5511e0cb2269
1 // Verify we can modify the environment.
2 import java.io.BufferedReader;
3 import java.io.InputStream;
4 import java.io.InputStreamReader;
5 import java.util.Map;
9 public class Process_7
11 public static void main(String[] args)
13 try
15 ProcessBuilder pb = new ProcessBuilder("env");
16 Map<String, String> e = pb.environment();
17 e.clear();
18 String v = "process7_value";
19 String k = "PROCESS_7_KEY";
20 e.put(k, v);
21 Process p = pb.start();
22 InputStream is = p.getInputStream();
23 InputStreamReader isr = new InputStreamReader(is);
24 BufferedReader br = new BufferedReader(isr);
25 boolean found = false;
27 String result;
28 while ((result = br.readLine()) != null)
30 if (result.equals(k + '=' + v))
31 found = true;
33 if (!found)
35 System.out.println("bad");
36 return;
38 System.out.println("ok");
40 catch (Exception ex)
42 System.out.println(ex.toString());