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

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

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:path/path.dart"; 5 import "package:path/path.dart";
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import "dart:io"; 7 import "dart:io";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:isolate"; 9 import "dart:isolate";
10 10
11 void testRunShell() { 11 void testRunShell() {
12 test(args) { 12 test(args) {
13 asyncStart(); 13 asyncStart();
14 var path = Platform.script.resolve("process_echo_util.dart").toFilePath(); 14 var path = join(dirname(Platform.script), "process_echo_util.dart");
15 Process.run(Platform.executable, 15 Process.run(Platform.executable,
16 [path]..addAll(args), 16 [path]..addAll(args),
17 runInShell: true) 17 runInShell: true)
18 .then((result) { 18 .then((result) {
19 if (Platform.operatingSystem == "windows") { 19 if (Platform.operatingSystem == "windows") {
20 result = result.stdout.split("\r\n"); 20 result = result.stdout.split("\r\n");
21 } else { 21 } else {
22 result = result.stdout.split("\n"); 22 result = result.stdout.split("\n");
23 } 23 }
24 if (result.length - 1 != args.length) { 24 if (result.length - 1 != args.length) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 test("'\"'"); 59 test("'\"'");
60 test("'\$HOME'"); 60 test("'\$HOME'");
61 } 61 }
62 62
63 void main() { 63 void main() {
64 testRunShell(); 64 testRunShell();
65 testBadRunShell(); 65 testBadRunShell();
66 } 66 }
67 67
OLDNEW
« no previous file with comments | « tests/standalone/io/process_set_exit_code_test.dart ('k') | tests/standalone/io/process_sync_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698