| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "dart:io"; | 6 import "dart:io"; |
| 7 import "dart:isolate"; | 7 import "dart:isolate"; |
| 8 import "process_test_util.dart"; | 8 import "process_test_util.dart"; |
| 9 | 9 |
| 10 runEnvironmentProcess(Map environment, name, , includeParentcallback) { | 10 runEnvironmentProcess(Map environment, name, includeParent, callback) { |
| 11 var dartExecutable = Platform.executable; | 11 var dartExecutable = Platform.executable; |
| 12 var printEnv = 'tests/standalone/io/print_env.dart'; | 12 var printEnv = 'tests/standalone/io/print_env.dart'; |
| 13 if (!new File(printEnv).existsSync()) { | 13 if (!new File(printEnv).existsSync()) { |
| 14 printEnv = '../$printEnv'; | 14 printEnv = '../$printEnv'; |
| 15 } | 15 } |
| 16 Process.run(dartExecutable, | 16 Process.run(dartExecutable, |
| 17 [printEnv, name], | 17 [printEnv, name], |
| 18 environment: environment, | 18 environment: environment, |
| 19 includeParentEnvironment: includeParent) | 19 includeParentEnvironment: includeParent) |
| 20 .then((result) { | 20 .then((result) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 runEnvironmentProcess(env, "PATH", false, (output) { | 59 runEnvironmentProcess(env, "PATH", false, (output) { |
| 60 donePort.close(); | 60 donePort.close(); |
| 61 Expect.isTrue(output.startsWith("null")); | 61 Expect.isTrue(output.startsWith("null")); |
| 62 }); | 62 }); |
| 63 } | 63 } |
| 64 | 64 |
| 65 main() { | 65 main() { |
| 66 testEnvironment(); | 66 testEnvironment(); |
| 67 testNoIncludeEnvironment(); | 67 testNoIncludeEnvironment(); |
| 68 } | 68 } |
| OLD | NEW |