Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: tests/standalone/io/platform_executable_test.dart

Issue 1178643007: Resolve the executable path on Mac OS when sym-linked (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/platform_win.cc ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/platform_executable_test.dart
diff --git a/tests/standalone/io/platform_executable_test.dart b/tests/standalone/io/platform_executable_test.dart
index 638be57d512c9cf2ad1c4235e9ef49db4ed236fc..3a0e16c73574bca64f6f7512051b34b8f688f957 100644
--- a/tests/standalone/io/platform_executable_test.dart
+++ b/tests/standalone/io/platform_executable_test.dart
@@ -44,14 +44,13 @@ void testDartExecShouldNotBeInCurrentDir() {
}
void testShouldSucceedWithEmptyPathEnvironment() {
- var command = Platform.isWindows ? 'dir' : 'ls';
+ var command = Platform.isWindows ? 'cmd' : 'ls';
Process.runSync(command, [],
includeParentEnvironment: false,
environment: {_SCRIPT_KEY: 'yes', 'PATH': ''});
}
void testShouldSucceedWithSourcePlatformExecutable() {
- //print('*** Running normally');
verify(Platform.executable);
}
@@ -59,7 +58,6 @@ void testExeSymLinked(Directory dir) {
var dirUri = new Uri.directory(dir.path);
var link = new Link.fromUri(dirUri.resolve('dart_exe_link'));
link.createSync(Platform.executable);
- //print('*** Creating a sym-link to the executable');
verify(link.path);
}
@@ -67,7 +65,6 @@ void testPathToDirWithExeSymLinked(Directory dir) {
var dirUri = new Uri.directory(dir.path);
var link = new Link.fromUri(dirUri.resolve('dart_exe_link'));
link.createSync(Platform.executable);
- //print('*** Path to a directory that contains a sym-link to dart bin');
verify('dart_exe_link', altPath: dir.path);
}
@@ -85,7 +82,6 @@ void testExeDirSymLinked(Directory dir) {
var linkedBin =
new Uri.directory(linkDirUri.toFilePath()).resolve(platformExeName);
- //print('*** Running in a sym-linked directory');
verify(linkedBin.toFilePath());
}
@@ -99,7 +95,6 @@ void testPathPointsToSymLinkedSDKPath(Directory dir) {
link.createSync(exeFile.parent.path);
- //print('*** Path points to a sym-linked SDK dir');
verify(platformExeName, altPath: link.path);
}
@@ -107,7 +102,6 @@ void testPathToSDKDir() {
var exeFile = new File(Platform.executable);
var binDirPath = exeFile.parent.path;
- //print('*** Running with PATH env set to environment - fixed in 16994 - thanks!');
verify(platformExeName, altPath: binDirPath);
}
@@ -135,10 +129,16 @@ void main() {
testDartExecShouldNotBeInCurrentDir();
testShouldSucceedWithSourcePlatformExecutable(); /// 00: ok
- withTempDir(testExeSymLinked); /// 01: ok
+ // dart:io does not support linking to files in Windows.
+ if (!Platform.isWindows) {
+ withTempDir(testExeSymLinked); /// 01: ok
+ }
withTempDir(testExeDirSymLinked); /// 02: ok
testPathToSDKDir(); /// 03: ok
withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok
- withTempDir(testPathToDirWithExeSymLinked); /// 05: ok
+ // dart:io does not support linking to files in Windows.
+ if (!Platform.isWindows) {
+ withTempDir(testPathToDirWithExeSymLinked); /// 05: ok
+ }
testShouldSucceedWithEmptyPathEnvironment(); /// 06: ok
}
« no previous file with comments | « runtime/bin/platform_win.cc ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698