| 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 // Process test program to test process communication. | 5 // Process test program to test process communication. |
| 6 | 6 |
| 7 library PlatformExecutableTest; | 7 library PlatformExecutableTest; |
| 8 | 8 |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // The same script is used for both running the tests and as for starting | 134 // The same script is used for both running the tests and as for starting |
| 135 // child verifying the value of Platform.resolvedExecutable. If the | 135 // child verifying the value of Platform.resolvedExecutable. If the |
| 136 // environment variable _SCRIPT_KEY is set this is a child process which | 136 // environment variable _SCRIPT_KEY is set this is a child process which |
| 137 // should print the value of Platform.resolvedExecutable. | 137 // should print the value of Platform.resolvedExecutable. |
| 138 if (Platform.environment.containsKey(_SCRIPT_KEY)) { | 138 if (Platform.environment.containsKey(_SCRIPT_KEY)) { |
| 139 print(Platform.resolvedExecutable); | 139 print(Platform.resolvedExecutable); |
| 140 return; | 140 return; |
| 141 } | 141 } |
| 142 | 142 |
| 143 testDartExecShouldNotBeInCurrentDir(); | 143 testDartExecShouldNotBeInCurrentDir(); |
| 144 testShouldSucceedWithSourcePlatformExecutable(); /// 00: ok | 144 testShouldSucceedWithSourcePlatformExecutable(); //# 00: ok |
| 145 // dart:io does not support linking to files in Windows. | 145 // dart:io does not support linking to files in Windows. |
| 146 if (!Platform.isWindows) { | 146 if (!Platform.isWindows) { |
| 147 withTempDir(testExeSymLinked); /// 01: ok | 147 withTempDir(testExeSymLinked); //# 01: ok |
| 148 } | 148 } |
| 149 withTempDir(testExeDirSymLinked); /// 02: ok | 149 withTempDir(testExeDirSymLinked); //# 02: ok |
| 150 testPathToSDKDir(); /// 03: ok | 150 testPathToSDKDir(); //# 03: ok |
| 151 withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok | 151 withTempDir(testPathPointsToSymLinkedSDKPath); //# 04: ok |
| 152 // dart:io does not support linking to files in Windows. | 152 // dart:io does not support linking to files in Windows. |
| 153 if (!Platform.isWindows) { | 153 if (!Platform.isWindows) { |
| 154 withTempDir(testPathToDirWithExeSymLinked); /// 05: ok | 154 withTempDir(testPathToDirWithExeSymLinked); //# 05: ok |
| 155 } | 155 } |
| 156 testShouldFailOutsidePath(); /// 06: ok | 156 testShouldFailOutsidePath(); //# 06: ok |
| 157 } | 157 } |
| OLD | NEW |