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

Side by Side Diff: tests/standalone/io/process_environment_test.dart

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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, callback) { 10 runEnvironmentProcess(Map environment, name, callback) {
11 var dartExecutable = new Options().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 .then((result) { 19 .then((result) {
20 Expect.equals(0, result.exitCode); 20 Expect.equals(0, result.exitCode);
21 callback(result.stdout); 21 callback(result.stdout);
(...skipping 24 matching lines...) Expand all
46 }); 46 });
47 // Only check one value to not spin up too many processes testing the 47 // Only check one value to not spin up too many processes testing the
48 // same things. 48 // same things.
49 break; 49 break;
50 } 50 }
51 } 51 }
52 52
53 main() { 53 main() {
54 testEnvironment(); 54 testEnvironment();
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698