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

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

Issue 1145053002: Make Platform.executable return a fully qualified path the the executable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments Created 5 years, 7 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
« runtime/bin/platform_android.cc ('K') | « sdk/lib/io/platform.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/platform_test.dart
diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart
index e3ee4d43780f0905b42637276ed4352876aaf596..269a4871a4e3a4b884e46c3e3fca89790c5940f9 100644
--- a/tests/standalone/io/platform_test.dart
+++ b/tests/standalone/io/platform_test.dart
@@ -25,6 +25,15 @@ test() {
var environment = Platform.environment;
Expect.isTrue(environment is Map<String, String>);
Expect.isTrue(Platform.executable.contains('dart'));
+ if (!Platform.isWindows) {
+ Expect.isTrue(Platform.executable.startsWith('/'));
+ } else {
+ // This assumes that tests (both locally and on the bots) are
+ // running off a location referred to by a drive letter. If a UNC
+ // location is used or long names ("\\?\" prefix) is used this
+ // needs to be fixed.
+ Expect.equals(Platform.executable.substring(1, 3), ':\\');
+ }
// Move directory to be sure script is correct.
var oldDir = Directory.current;
Directory.current = Directory.current.parent;
« runtime/bin/platform_android.cc ('K') | « sdk/lib/io/platform.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698