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

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

Issue 1180623006: Revert change to Platform.excutable and add Platform.resolvedExecutable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated dart2js io_patch.dart 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 | « tests/standalone/io/platform_executable_test.dart ('k') | tests/standalone/io/platform_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/platform_resolved_executable_test.dart
diff --git a/tests/standalone/io/platform_executable_test.dart b/tests/standalone/io/platform_resolved_executable_test.dart
similarity index 83%
rename from tests/standalone/io/platform_executable_test.dart
rename to tests/standalone/io/platform_resolved_executable_test.dart
index 3a0e16c73574bca64f6f7512051b34b8f688f957..c8a617484b926ef97a6e709f75736007fd749c63 100644
--- a/tests/standalone/io/platform_executable_test.dart
+++ b/tests/standalone/io/platform_resolved_executable_test.dart
@@ -35,7 +35,7 @@ void verify(String exePath, {String altPath}) {
}
var result = processResult.stdout.trim();
- expectEquals(Platform.executable, result);
+ expectEquals(Platform.resolvedExecutable, result);
}
void testDartExecShouldNotBeInCurrentDir() {
@@ -51,20 +51,20 @@ void testShouldSucceedWithEmptyPathEnvironment() {
}
void testShouldSucceedWithSourcePlatformExecutable() {
- verify(Platform.executable);
+ verify(Platform.resolvedExecutable);
}
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);
+ link.createSync(Platform.resolvedExecutable);
verify(link.path);
}
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);
+ link.createSync(Platform.resolvedExecutable);
verify('dart_exe_link', altPath: dir.path);
}
@@ -75,7 +75,7 @@ void testExeDirSymLinked(Directory dir) {
var linkDirUri = dirUri.resolve('dart_bin_dir_link');
var link = new Link.fromUri(linkDirUri);
- var exeFile = new File(Platform.executable);
+ var exeFile = new File(Platform.resolvedExecutable);
link.createSync(exeFile.parent.path);
@@ -91,7 +91,7 @@ void testPathPointsToSymLinkedSDKPath(Directory dir) {
var linkDirUri = dirUri.resolve('dart_bin_dir_link');
var link = new Link.fromUri(linkDirUri);
- var exeFile = new File(Platform.executable);
+ var exeFile = new File(Platform.resolvedExecutable);
link.createSync(exeFile.parent.path);
@@ -99,7 +99,7 @@ void testPathPointsToSymLinkedSDKPath(Directory dir) {
}
void testPathToSDKDir() {
- var exeFile = new File(Platform.executable);
+ var exeFile = new File(Platform.resolvedExecutable);
var binDirPath = exeFile.parent.path;
verify(platformExeName, altPath: binDirPath);
@@ -115,15 +115,19 @@ void withTempDir(void test(Directory dir)) {
}
String get platformExeName {
- var raw = new Uri.file(Platform.executable);
+ var raw = new Uri.file(Platform.resolvedExecutable);
return raw.pathSegments.last;
}
String get scriptPath => Platform.script.toFilePath();
void main() {
+ // The same script is used for both running the tests and as for starting
+ // child verifying the value of Platform.resolvedExecutable. If the
+ // environment variable _SCRIPT_KEY is set this is a child process which
+ // should print the value of Platform.resolvedExecutable.
if (Platform.environment.containsKey(_SCRIPT_KEY)) {
- print(Platform.executable);
+ print(Platform.resolvedExecutable);
return;
}
« no previous file with comments | « tests/standalone/io/platform_executable_test.dart ('k') | tests/standalone/io/platform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698